ASF Bugzilla – Attachment 28894 Details for
Bug 53050
org.apache.catalina.session.ManagerBase has issues with update the seed (initialized to System.currentTimeMillis()), since only the 32 least significant bits are changed by the XOR.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
2012-06-05_tc6_53050_ManagerBase.patch
2012-06-05_tc6_53050_ManagerBase.patch (text/plain), 1.36 KB, created by
Konstantin Kolinko
on 2012-06-05 20:42:41 UTC
(
hide
)
Description:
2012-06-05_tc6_53050_ManagerBase.patch
Filename:
MIME Type:
Creator:
Konstantin Kolinko
Created:
2012-06-05 20:42:41 UTC
Size:
1.36 KB
patch
obsolete
>Index: java/org/apache/catalina/session/ManagerBase.java >=================================================================== >--- java/org/apache/catalina/session/ManagerBase.java (revision 1346371) >+++ java/org/apache/catalina/session/ManagerBase.java (working copy) >@@ -25,6 +25,7 @@ > import java.io.File; > import java.io.FileInputStream; > import java.io.IOException; >+import java.io.UnsupportedEncodingException; > import java.lang.reflect.Method; > import java.security.AccessController; > import java.security.MessageDigest; >@@ -416,7 +417,12 @@ > // Ignore > } > if (apr) { >- setEntropy(new String(result)); >+ try { >+ setEntropy(new String(result, "ISO-8859-1")); >+ } catch (UnsupportedEncodingException ux) { >+ // ISO-8859-1 should always be supported >+ throw new Error(ux); >+ } > } else { > setEntropy(this.toString()); > } >@@ -580,7 +586,7 @@ > long t1 = seed; > char entropy[] = getEntropy().toCharArray(); > for (int i = 0; i < entropy.length; i++) { >- long update = ((byte) entropy[i]) << ((i % 8) * 8); >+ long update = ((long) entropy[i]) << ((i % 8) * 8); > seed ^= update; > } > try {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 53050
: 28894 |
28895