diff --git a/server/src/main/java/password/pwm/PwmConstants.java b/server/src/main/java/password/pwm/PwmConstants.java index a3bf1751c..dff09aa9a 100644 --- a/server/src/main/java/password/pwm/PwmConstants.java +++ b/server/src/main/java/password/pwm/PwmConstants.java @@ -217,6 +217,7 @@ public abstract class PwmConstants "Your password must be scanned by the TSA to ensure the safety of your fellow travelers. Please take off your password's shoes to continue.", "That password really tied the room together dude.", "Bite my shiny metal password!", + "ben makes password software go woooo", //nick helm "I needed a password eight characters long so I picked Snow White and the Seven Dwarves.", diff --git a/server/src/main/java/password/pwm/util/CaptchaUtility.java b/server/src/main/java/password/pwm/util/CaptchaUtility.java index ad2e486d5..375f034ec 100644 --- a/server/src/main/java/password/pwm/util/CaptchaUtility.java +++ b/server/src/main/java/password/pwm/util/CaptchaUtility.java @@ -338,16 +338,19 @@ private static boolean checkIfCaptchaParamPresent( final PwmRequest pwmRequest ) final String configValue = pwmRequest.getConfig().readSettingAsString( PwmSetting.CAPTCHA_SKIP_PARAM ); if ( !StringUtil.isEmpty( configValue ) ) { - final String skipCaptcha = pwmRequest.readParameterAsString( PwmConstants.PARAM_SKIP_CAPTCHA ); - if ( StringUtil.nullSafeEquals( configValue, skipCaptcha ) ) + final String requestValue = pwmRequest.readParameterAsString( PwmConstants.PARAM_SKIP_CAPTCHA ); + if ( !StringUtil.isEmpty( requestValue ) ) { - LOGGER.trace( pwmRequest, () -> "valid skipCaptcha value in request, skipping captcha check for this session" ); - pwmRequest.getPwmSession().getSessionStateBean().setCaptchaBypassedViaParameter( true ); - return true; - } - else - { - LOGGER.error( pwmRequest, "skipCaptcha value is in request, however value '" + skipCaptcha + "' does not match configured value" ); + if ( StringUtil.nullSafeEquals( configValue, requestValue ) ) + { + LOGGER.trace( pwmRequest, () -> "valid skipCaptcha value in request, skipping captcha check for this session" ); + pwmRequest.getPwmSession().getSessionStateBean().setCaptchaBypassedViaParameter( true ); + return true; + } + else + { + LOGGER.error( pwmRequest, "skipCaptcha value is in request, however value '" + requestValue + "' does not match configured value" ); + } } } diff --git a/server/src/main/java/password/pwm/util/MBeanUtility.java b/server/src/main/java/password/pwm/util/MBeanUtility.java index 253d4a43a..a77b7813f 100644 --- a/server/src/main/java/password/pwm/util/MBeanUtility.java +++ b/server/src/main/java/password/pwm/util/MBeanUtility.java @@ -64,7 +64,7 @@ public static void registerMBean( final PwmApplication pwmApplication ) } catch ( Exception e ) { - LOGGER.error( "error registering mbean: " + e.getMessage() ); + LOGGER.debug( () -> "error registering mbean: " + e.getMessage() ); } } @@ -77,7 +77,7 @@ public static void unregisterMBean( final PwmApplication pwmApplication ) } catch ( Exception e ) { - LOGGER.error( "error unregistering mbean: " + e.getMessage() ); + LOGGER.debug( () -> "error unregistering mbean: " + e.getMessage() ); } }