[jboss-cvs] JBossAS SVN: r110552 - projects/security/security-jboss-sx/branches/2.0.4.SP4_SECURITY-564/jbosssx/src/main/java/org/jboss/resource/security.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sun Feb 6 09:26:46 EST 2011
Author: raggz
Date: 2011-02-06 09:26:46 -0500 (Sun, 06 Feb 2011)
New Revision: 110552
Modified:
projects/security/security-jboss-sx/branches/2.0.4.SP4_SECURITY-564/jbosssx/src/main/java/org/jboss/resource/security/SecureIdentityLoginModule.java
Log:
This is one off patch for JIRA SECURITY-563
Modified: projects/security/security-jboss-sx/branches/2.0.4.SP4_SECURITY-564/jbosssx/src/main/java/org/jboss/resource/security/SecureIdentityLoginModule.java
===================================================================
--- projects/security/security-jboss-sx/branches/2.0.4.SP4_SECURITY-564/jbosssx/src/main/java/org/jboss/resource/security/SecureIdentityLoginModule.java 2011-02-06 14:07:00 UTC (rev 110551)
+++ projects/security/security-jboss-sx/branches/2.0.4.SP4_SECURITY-564/jbosssx/src/main/java/org/jboss/resource/security/SecureIdentityLoginModule.java 2011-02-06 14:26:46 UTC (rev 110552)
@@ -187,6 +187,14 @@
{
encoding[i + pad] = old[i];
}
+ //SECURITY-563: handle negative numbers
+ if (n.signum() == -1)
+ {
+ for (int i = 0; i < newLength - length; i++)
+ {
+ encoding[i] = (byte) -1;
+ }
+ }
}
Cipher cipher = Cipher.getInstance("Blowfish");
@@ -205,4 +213,4 @@
String encode = encode(args[0]);
System.out.println("Encoded password: "+encode);
}
-}
\ No newline at end of file
+}
More information about the jboss-cvs-commits
mailing list