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:15:14 UTC
svn commit: r752135 -
/portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/LdapAuthenticationProvider.java
Author: ddam
Date: Tue Mar 10 15:15:07 2009
New Revision: 752135
URL: http://svn.apache.org/viewvc?rev=752135&view=rev
Log:
clone LDAP environment to prevent synchronization issues
Modified:
portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/LdapAuthenticationProvider.java
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/LdapAuthenticationProvider.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/LdapAuthenticationProvider.java?rev=752135&r1=752134&r2=752135&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/LdapAuthenticationProvider.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/LdapAuthenticationProvider.java Tue Mar 10 15:15:07 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