svn commit: r1610048 - in /portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE: components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/ jetspeed-portal-resources/src/main/resources/assembly/alternate/credenti...

[email protected]
Newsgroups gmane.comp.jakarta.jetspeed.devel
Message-ID <[email protected]>
Author: taylor
Date: Sat Jul 12 20:59:51 2014
New Revision: 1610048

URL: http://svn.apache.org/r1610048
Log:
JS2-1286: backporting changes from trunk to 2.2.3 maintenance release

Added:
    portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-portal-resources/src/main/resources/assembly/alternate/credentials/
    portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-portal-resources/src/main/resources/assembly/alternate/credentials/security-spi-atn.xml
      - copied unchanged from r1601781, portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/alternate/credentials/security-spi-atn.xml
    portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-portal-resources/src/main/resources/assembly/alternate/credentials/security-spi.xml
      - copied unchanged from r1601781, portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/alternate/credentials/security-spi.xml
Modified:
    portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/AlgorithmUpgradePBEPasswordService.java

Modified: portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/AlgorithmUpgradePBEPasswordService.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/AlgorithmUpgradePBEPasswordService.java?rev=1610048&r1=1610047&r2=1610048&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/AlgorithmUpgradePBEPasswordService.java (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/AlgorithmUpgradePBEPasswordService.java Sat Jul 12 20:59:51 2014
@@ -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());
         }
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.