syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giacom...@apache.org
Subject syncope git commit: [SYNCOPE-927] Captcha check improved
Date Wed, 31 Aug 2016 14:53:00 GMT
Repository: syncope
Updated Branches:
  refs/heads/master f49bb10d5 -> 8150cf84b


[SYNCOPE-927] Captcha check improved


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

Branch: refs/heads/master
Commit: 8150cf84b2f34eac46ba3c193c2c138259baec23
Parents: f49bb10
Author: giacomolm <giacomolm@hotmail.it>
Authored: Wed Aug 31 16:51:55 2016 +0200
Committer: giacomolm <giacomolm@hotmail.it>
Committed: Wed Aug 31 16:51:55 2016 +0200

----------------------------------------------------------------------
 .../syncope/client/enduser/resources/AbstractBaseResource.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/8150cf84/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/AbstractBaseResource.java
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/AbstractBaseResource.java
b/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/AbstractBaseResource.java
index 6f38d0d..d42fc30 100644
--- a/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/AbstractBaseResource.java
+++ b/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/AbstractBaseResource.java
@@ -61,11 +61,11 @@ public abstract class AbstractBaseResource extends AbstractResource {
     }
 
     protected final boolean captchaCheck(final String enteredCaptcha, final Object currentCaptcha)
{
-        String toCheck = currentCaptcha.toString();
+
         return SyncopeEnduserApplication.get().isCaptchaEnabled()
-                ? StringUtils.isBlank(toCheck) || enteredCaptcha == null
+                ? StringUtils.isBlank(currentCaptcha.toString()) || enteredCaptcha == null
                 ? false
-                : enteredCaptcha.equals(toCheck)
+                : enteredCaptcha.equals(currentCaptcha.toString())
                 : true;
     }
 }


Mime
View raw message