You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ta...@apache.org on 2013/07/26 00:25:28 UTC

svn commit: r1507144 - /portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/AlgorithmUpgradePBEPasswordService.java

Author: taylor
Date: Thu Jul 25 22:25:28 2013
New Revision: 1507144

URL: http://svn.apache.org/r1507144
Log:
JS2-1286: while debugging this problem, it appears credential.getNewPassword is always null, while clearTextPassword had the correct password to encode with new algorithm. This simple change worked in all test cases applied

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/AlgorithmUpgradePBEPasswordService.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/AlgorithmUpgradePBEPasswordService.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/AlgorithmUpgradePBEPasswordService.java?rev=1507144&r1=1507143&r2=1507144&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/AlgorithmUpgradePBEPasswordService.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/AlgorithmUpgradePBEPasswordService.java Thu Jul 25 22:25:28 2013
@@ -16,17 +16,18 @@
  */
 package org.apache.jetspeed.security.spi.impl;
 
-import java.security.NoSuchAlgorithmException;
-import java.security.spec.InvalidKeySpecException;
-import java.sql.Timestamp;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
 import org.apache.jetspeed.security.AlgorithmUpgradePasswordEncodingService;
 import org.apache.jetspeed.security.CredentialPasswordEncoder;
 import org.apache.jetspeed.security.PasswordCredential;
 import org.apache.jetspeed.security.SecurityException;
 import org.apache.jetspeed.security.spi.AlgorithmUpgradeCredentialPasswordEncoder;
 
+import java.security.NoSuchAlgorithmException;
+import java.security.spec.InvalidKeySpecException;
+import java.sql.Timestamp;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+
 /**
  * <p>
  * MessageDigestToPBEPasswordUpgradeService allows for migrating from a MessageDigestCredentialPasswordEncoder
@@ -66,7 +67,10 @@ public class AlgorithmUpgradePBEPassword
         }
         else
         {
-            return encode(credential.getUserName(), credential.getNewPassword());
+            // 2013-07-25: DST: while debugging this problem, it appears credential.getNewPassword is always null,
+            // while clearTextPassword had the correct password to encode with new algorithm
+            // see: https://issues.apache.org/jira/browse/JS2-1286
+            return encode(credential.getUserName(), clearTextPassword); // credential.getNewPassword());
         }
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org