From f3112c15b88e4c265b5a6e39143ba1b09c0c9f00 Mon Sep 17 00:00:00 2001 From: Jason Rivard Date: Fri, 8 Jan 2016 06:08:50 -0500 Subject: [PATCH] minor profile fixes --- pom.xml | 7 +++++++ .../pwm/http/servlet/UpdateProfileServlet.java | 13 ++++++------- .../java/password/pwm/util/LoginCookieManager.java | 2 ++ .../resources/password/pwm/AppProperty.properties | 2 +- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index b27cb6230..7f1e1a496 100644 --- a/pom.xml +++ b/pom.xml @@ -368,6 +368,13 @@ jcl-core 2.7 + + + org.apache.cxf + cxf-bundle-jaxrs + 2.7.7 + + diff --git a/src/main/java/password/pwm/http/servlet/UpdateProfileServlet.java b/src/main/java/password/pwm/http/servlet/UpdateProfileServlet.java index 5f7ce6fa0..f39fc851a 100644 --- a/src/main/java/password/pwm/http/servlet/UpdateProfileServlet.java +++ b/src/main/java/password/pwm/http/servlet/UpdateProfileServlet.java @@ -150,7 +150,7 @@ protected void processAction(final PwmRequest pwmRequest) return; case enterCode: - handleEnterCodeRequest(pwmRequest, updateProfileBean, updateAttributesProfile); + handleEnterCodeRequest(pwmRequest, updateProfileBean); break; } } @@ -598,9 +598,7 @@ public void initializeToken( pwmSession.getSessionStateBean().getLocale()); try { - TokenService.TokenSender.sendSmsToken(pwmApplication, null, macroMachine, - toNum, message, tokenKey); - System.out.println(tokenKey); + TokenService.TokenSender.sendSmsToken(pwmApplication, null, macroMachine, toNum, message, tokenKey); } catch (Exception e) { throw new PwmUnrecoverableException(new ErrorInformation(PwmError.ERROR_UNKNOWN)); } @@ -613,7 +611,9 @@ public void initializeToken( case EMAIL: { final EmailItemBean configuredEmailSetting = config.readSettingAsEmail( - PwmSetting.EMAIL_NEWUSER_VERIFICATION, pwmSession.getSessionStateBean().getLocale()); + PwmSetting.EMAIL_UPDATEPROFILE_VERIFICATION, + pwmRequest.getLocale() + ); final String emailAddressAttribute = pwmRequest.getConfig().readSettingAsString(PwmSetting.EMAIL_USER_MAIL_ATTRIBUTE); final String toAddress = updateProfileBean.getFormData().get(emailAddressAttribute); @@ -659,8 +659,7 @@ public void initializeToken( private void handleEnterCodeRequest( final PwmRequest pwmRequest, - final UpdateProfileBean updateProfileBean, - final UpdateAttributesProfile updateAttributesProfile + final UpdateProfileBean updateProfileBean ) throws PwmUnrecoverableException, IOException, ServletException, ChaiUnavailableException { diff --git a/src/main/java/password/pwm/util/LoginCookieManager.java b/src/main/java/password/pwm/util/LoginCookieManager.java index c6050bd9b..f82f6d9ea 100644 --- a/src/main/java/password/pwm/util/LoginCookieManager.java +++ b/src/main/java/password/pwm/util/LoginCookieManager.java @@ -89,6 +89,8 @@ public void writeLoginCookieToResponse(final PwmRequest pwmRequest) { final ErrorInformation errorInformation = new ErrorInformation(PwmError.ERROR_UNKNOWN,errorMsg); LOGGER.error(pwmRequest, errorInformation); } + + System.out.println(JsonUtil.serialize(pwmRequest.getPwmSession().getLoginInfoBean())); } public void readLoginInfoCookie(final PwmRequest pwmRequest) throws PwmUnrecoverableException { diff --git a/src/main/resources/password/pwm/AppProperty.properties b/src/main/resources/password/pwm/AppProperty.properties index 90b9e7337..4f1110b99 100644 --- a/src/main/resources/password/pwm/AppProperty.properties +++ b/src/main/resources/password/pwm/AppProperty.properties @@ -89,7 +89,7 @@ http.cookie.authRecord.age=604800 http.cookie.maxReadLength=10240 http.cookie.captchaSkip.name=captcha-key http.cookie.captchaSkip.age=86400 -http.cookie.login.name=LC +http.cookie.login.name=SESSION http.parameter.forward=forwardURL http.parameter.logout=logoutURL http.parameter.theme=theme