struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject struts git commit: Uses better random generator
Date Fri, 21 Nov 2014 18:21:49 GMT
Repository: struts
Updated Branches:
  refs/heads/develop e1025a207 -> 1f301038a


Uses better random generator


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/1f301038
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/1f301038
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/1f301038

Branch: refs/heads/develop
Commit: 1f301038a751bf16e525607c3db513db835b2999
Parents: e1025a2
Author: Lukasz Lenart <lukaszlenart@apache.org>
Authored: Fri Nov 21 19:21:35 2014 +0100
Committer: Lukasz Lenart <lukaszlenart@apache.org>
Committed: Fri Nov 21 19:21:35 2014 +0100

----------------------------------------------------------------------
 core/src/main/java/org/apache/struts2/util/TokenHelper.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/1f301038/core/src/main/java/org/apache/struts2/util/TokenHelper.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/util/TokenHelper.java b/core/src/main/java/org/apache/struts2/util/TokenHelper.java
index 9d72ac7..2e103da 100644
--- a/core/src/main/java/org/apache/struts2/util/TokenHelper.java
+++ b/core/src/main/java/org/apache/struts2/util/TokenHelper.java
@@ -27,6 +27,7 @@ import com.opensymphony.xwork2.util.logging.Logger;
 import com.opensymphony.xwork2.util.logging.LoggerFactory;
 
 import java.math.BigInteger;
+import java.security.SecureRandom;
 import java.util.Map;
 import java.util.Random;
 
@@ -51,7 +52,7 @@ public class TokenHelper {
      */
     public static final String TOKEN_NAME_FIELD = "struts.token.name";
     private static final Logger LOG = LoggerFactory.getLogger(TokenHelper.class);
-    private static final Random RANDOM = new Random();
+    private static final Random RANDOM = new SecureRandom();
 
 
     /**


Mime
View raw message