Repository: syncope
Updated Branches:
  refs/heads/master 275ca966c -> 65cc0891c


[SYNCOPE-1370] password reset now stops on not matching captcha


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/65cc0891
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/65cc0891
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/65cc0891

Branch: refs/heads/master
Commit: 65cc0891cd052b6b74f25ccc80a2eb734a1b8450
Parents: 275ca96
Author: Andrea Patricelli <[email protected]>
Authored: Wed Sep 12 17:34:20 2018 +0200
Committer: Andrea Patricelli <[email protected]>
Committed: Wed Sep 12 17:43:00 2018 +0200

----------------------------------------------------------------------
 .../client/enduser/resources/UserSelfPasswordReset.java      | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/65cc0891/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/UserSelfPasswordReset.java
----------------------------------------------------------------------
diff --git 
a/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/UserSelfPasswordReset.java
 
b/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/UserSelfPasswordReset.java
index 77408a6..9fd42e9 100644
--- 
a/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/UserSelfPasswordReset.java
+++ 
b/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/UserSelfPasswordReset.java
@@ -74,7 +74,13 @@ public class UserSelfPasswordReset extends 
BaseUserSelfResource {
                         requestPasswordReset(usernameParam[0], null);
             }
         } catch (final Exception e) {
-            LOG.error("Error while updating user", e);
+            LOG.error("Unable to process password reset request", e);
+            response.setError(Response.Status.BAD_REQUEST.getStatusCode(),
+                    new StringBuilder().
+                            append("ErrorMessage{{ ").
+                            append(e.getMessage()).
+                            append(" }}").
+                            toString());
         }
 
         buildResponse(response, Response.Status.OK.getStatusCode(),

Reply via email to