Repository: syncope Updated Branches: refs/heads/2_1_X 0f21cafbe -> a0254d445
[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/a0254d44 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/a0254d44 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/a0254d44 Branch: refs/heads/2_1_X Commit: a0254d445d9f293bf1a368faa9b975178020161a Parents: 0f21caf Author: Andrea Patricelli <[email protected]> Authored: Wed Sep 12 17:34:20 2018 +0200 Committer: Andrea Patricelli <[email protected]> Committed: Wed Sep 12 17:42:27 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/a0254d44/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(),
