You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by co...@apache.org on 2014/06/12 16:27:07 UTC

svn commit: r1602175 - /syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/impl/LDAPPasswordSyncActions.java

Author: coheigea
Date: Thu Jun 12 14:27:07 2014
New Revision: 1602175

URL: http://svn.apache.org/r1602175
Log:
Fixing LDAPPasswordSyncActions following Encryptor/PasswordEncoder changes

Modified:
    syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/impl/LDAPPasswordSyncActions.java

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/impl/LDAPPasswordSyncActions.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/impl/LDAPPasswordSyncActions.java?rev=1602175&r1=1602174&r2=1602175&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/impl/LDAPPasswordSyncActions.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/impl/LDAPPasswordSyncActions.java Thu Jun 12 14:27:07 2014
@@ -61,11 +61,15 @@ public class LDAPPasswordSyncActions ext
             if (password != null && password.startsWith("{")) {
                 int closingBracketIndex = password.indexOf('}');
                 String digest = password.substring(1, password.indexOf('}'));
+                if (digest != null) {
+                    digest = digest.toUpperCase();
+                }
                 try {
                     encodedPassword = password.substring(closingBracketIndex + 1);
                     cipher = CipherAlgorithm.valueOf(digest);
                 } catch (IllegalArgumentException e) {
                     LOG.error("Cipher algorithm not allowed: {}", digest, e);
+                    encodedPassword = null;
                 }
             }
         }