Repository: syncope
Updated Branches:
  refs/heads/2_0_X d9091cdbe -> 9e6cc7c01
  refs/heads/master d611e65aa -> 335cfdab3


Fixing issue with migration from RandomStringUtils to RandomStringGenerator


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

Branch: refs/heads/2_0_X
Commit: 9e6cc7c01a26d5eff9f6975d3d8ebc169addba89
Parents: d9091cd
Author: Francesco Chicchiriccò <ilgro...@apache.org>
Authored: Mon Jun 19 17:52:18 2017 +0200
Committer: Francesco Chicchiriccò <ilgro...@apache.org>
Committed: Mon Jun 19 17:52:18 2017 +0200

----------------------------------------------------------------------
 .../syncope/client/enduser/resources/CaptchaResource.java       | 3 +--
 .../apache/syncope/core/spring/security/SecureRandomUtils.java  | 5 ++---
 2 files changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/9e6cc7c0/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/CaptchaResource.java
----------------------------------------------------------------------
diff --git 
a/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/CaptchaResource.java
 
b/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/CaptchaResource.java
index a514498..e60a532 100644
--- 
a/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/CaptchaResource.java
+++ 
b/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/CaptchaResource.java
@@ -19,7 +19,6 @@
 package org.apache.syncope.client.enduser.resources;
 
 import javax.servlet.http.HttpServletRequest;
-import org.apache.commons.text.CharacterPredicates;
 import org.apache.commons.text.RandomStringGenerator;
 import org.apache.syncope.client.enduser.SyncopeEnduserConstants;
 import org.apache.syncope.common.lib.SecureTextRandomProvider;
@@ -36,7 +35,7 @@ public class CaptchaResource extends CaptchaImageResource {
 
     private static final RandomStringGenerator RANDOM_LETTERS = new 
RandomStringGenerator.Builder().
             usingRandom(new SecureTextRandomProvider()).
-            filteredBy(CharacterPredicates.LETTERS).
+            withinRange('a', 'z').
             build();
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/9e6cc7c0/core/spring/src/main/java/org/apache/syncope/core/spring/security/SecureRandomUtils.java
----------------------------------------------------------------------
diff --git 
a/core/spring/src/main/java/org/apache/syncope/core/spring/security/SecureRandomUtils.java
 
b/core/spring/src/main/java/org/apache/syncope/core/spring/security/SecureRandomUtils.java
index 9fe8cb3..0e9e0ff 100644
--- 
a/core/spring/src/main/java/org/apache/syncope/core/spring/security/SecureRandomUtils.java
+++ 
b/core/spring/src/main/java/org/apache/syncope/core/spring/security/SecureRandomUtils.java
@@ -19,7 +19,6 @@
 package org.apache.syncope.core.spring.security;
 
 import org.apache.commons.text.CharacterPredicate;
-import org.apache.commons.text.CharacterPredicates;
 import org.apache.commons.text.RandomStringGenerator;
 import org.apache.syncope.common.lib.SecureTextRandomProvider;
 
@@ -31,12 +30,12 @@ public final class SecureRandomUtils {
 
     private static final RandomStringGenerator FOR_LETTERS = new 
RandomStringGenerator.Builder().
             usingRandom(new SecureTextRandomProvider()).
-            filteredBy(CharacterPredicates.LETTERS).
+            withinRange('a', 'z').
             build();
 
     private static final RandomStringGenerator FOR_NUMBERS = new 
RandomStringGenerator.Builder().
             usingRandom(new SecureTextRandomProvider()).
-            filteredBy(CharacterPredicates.LETTERS).
+            withinRange('0', '9').
             build();
 
     public static String generateRandomPassword(final int tokenLength) {

Reply via email to