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 dd...@apache.org on 2009/03/10 16:05:46 UTC

svn commit: r752130 - /portals/jetspeed-2/portal/branches/JETSPEED-2.2-PRE-PLUTO-2-SNAPSHOT/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/LdapAuthenticationProvider.java

Author: ddam
Date: Tue Mar 10 15:05:45 2009
New Revision: 752130

URL: http://svn.apache.org/viewvc?rev=752130&view=rev
Log:
clone LDAP environment to prevent synchronization issues

Modified:
    portals/jetspeed-2/portal/branches/JETSPEED-2.2-PRE-PLUTO-2-SNAPSHOT/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/LdapAuthenticationProvider.java

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.2-PRE-PLUTO-2-SNAPSHOT/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/LdapAuthenticationProvider.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.2-PRE-PLUTO-2-SNAPSHOT/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/LdapAuthenticationProvider.java?rev=752130&r1=752129&r2=752130&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.2-PRE-PLUTO-2-SNAPSHOT/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/LdapAuthenticationProvider.java (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.2-PRE-PLUTO-2-SNAPSHOT/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/LdapAuthenticationProvider.java Tue Mar 10 15:05:45 2009
@@ -116,10 +116,8 @@
     {
         try
         {
-            Hashtable env = context.getCtx().getEnvironment();
+            Hashtable env = (Hashtable) context.getCtx().getEnvironment().clone();
             // String savedPassword = String.valueOf(getPassword(uid));
-            String oldCredential = (String) env.get(Context.SECURITY_CREDENTIALS);
-            String oldUsername = (String) env.get(Context.SECURITY_PRINCIPAL);
             String dn = lookupByUid(userName);
             if (dn == null)
             {
@@ -138,8 +136,6 @@
             env.put(Context.SECURITY_PRINCIPAL, dn);
             env.put(Context.SECURITY_CREDENTIALS, password);
             new InitialContext(env);
-            env.put(Context.SECURITY_PRINCIPAL, oldUsername);
-            env.put(Context.SECURITY_CREDENTIALS, oldCredential);
             return true;
         }
         catch (AuthenticationException aex)



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