Repository: syncope Updated Branches: refs/heads/2_0_X 8ad88dcfc -> f9fabbf62
[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/f9fabbf6 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/f9fabbf6 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/f9fabbf6 Branch: refs/heads/2_0_X Commit: f9fabbf620872f8ac138cec5c488d04b3072899f Parents: 8ad88dc Author: Andrea Patricelli <[email protected]> Authored: Wed Sep 12 17:34:20 2018 +0200 Committer: Andrea Patricelli <[email protected]> Committed: Wed Sep 12 17:35:01 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/f9fabbf6/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(),
