portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject 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
Date Tue, 10 Mar 2009 15:05:46 GMT
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


Mime
View raw message