@@ -642,7 +642,7 @@ else if(form.getEmail() != null && !form.getEmail().equals(form.getEmailConfirm(
642642 }
643643
644644 // On success returns null and clears the session attribute so the captcha cannot be replayed.
645- // On failure return a a user-facing error message.
645+ // On failure return a user-facing error message.
646646 // Logging matches LoginController's RegisterUserAction.
647647 private String verifyCaptcha (String submittedText , String emailForLogging )
648648 {
@@ -655,7 +655,7 @@ private String verifyCaptcha(String submittedText, String emailForLogging)
655655 }
656656 if (!expected .equalsIgnoreCase (StringUtils .trimToNull (submittedText )))
657657 {
658- _log .warn ("Captcha text did not match for signup attempt for " + emailForLogging );
658+ _log .warn ("Captcha text did not match for signup attempt for {}" , emailForLogging );
659659 return "Verification text does not match, please retry." ;
660660 }
661661 session .removeAttribute (LabKeyKaptchaServlet .SESSION_KEY_VALUE );
@@ -892,13 +892,15 @@ public ApiResponse execute(SignupForm signupForm, BindException errors) throws E
892892 validateSignupForm (signupForm , errors );
893893 if (errors .hasErrors ())
894894 {
895+ response .put ("status" , "ERROR" );
895896 response .put ("error_message" , errorsToMessages (errors ));
896897 return response ;
897898 }
898899
899900 ValidEmail email = parseAndValidateEmail (signupForm , errors );
900901 if (email == null )
901902 {
903+ response .put ("status" , "ERROR" );
902904 response .put ("error_message" , errorsToMessages (errors ));
903905 return response ;
904906 }
@@ -911,6 +913,7 @@ public ApiResponse execute(SignupForm signupForm, BindException errors) throws E
911913
912914 if (!createUserAndSendEmail (signupForm , email , errors ))
913915 {
916+ response .put ("status" , "ERROR" );
914917 response .put ("error_message" , errorsToMessages (errors ));
915918 return response ;
916919 }
0 commit comments