You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2013/01/08 12:04:34 UTC

svn commit: r1430207 - /ofbiz/branches/release10.04/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java

Author: jleroux
Date: Tue Jan  8 11:04:34 2013
New Revision: 1430207

URL: http://svn.apache.org/viewvc?rev=1430207&view=rev
Log:
Revert r1429273, there is a better solution that Deepak spotted

Modified:
    ofbiz/branches/release10.04/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java

Modified: ofbiz/branches/release10.04/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java?rev=1430207&r1=1430206&r2=1430207&view=diff
==============================================================================
--- ofbiz/branches/release10.04/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java (original)
+++ ofbiz/branches/release10.04/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java Tue Jan  8 11:04:34 2013
@@ -84,8 +84,6 @@ public class LoginWorker {
 
     /** This Map is keyed by the randomly generated externalLoginKey and the value is a UserLogin GenericValue object */
     public static Map<String, GenericValue> externalLoginKeys = FastMap.newInstance();
-    // This fast map is added as work around for repeated login issue
-    public static Map<String, GenericValue> externalLoginKeysWR = FastMap.newInstance();
 
     public static StringWrapper makeLoginUrl(PageContext pageContext) {
         return makeLoginUrl(pageContext, "checkLogin");
@@ -132,8 +130,6 @@ public class LoginWorker {
             // if the session has a previous key in place, remove it from the master list
             String sesExtKey = (String) session.getAttribute(EXTERNAL_LOGIN_KEY_ATTR);
             if (sesExtKey != null) {
-                // Work around for repeated login issue
-                externalLoginKeysWR.put(sesExtKey, userLogin);
                 externalLoginKeys.remove(sesExtKey);
             }
 
@@ -156,7 +152,6 @@ public class LoginWorker {
         String sesExtKey = (String) session.getAttribute(EXTERNAL_LOGIN_KEY_ATTR);
         if (sesExtKey != null) {
             externalLoginKeys.remove(sesExtKey);
-            externalLoginKeysWR.remove(sesExtKey);
         }
     }
 
@@ -527,7 +522,6 @@ public class LoginWorker {
     public static void doBasicLogin(GenericValue userLogin, HttpServletRequest request) {
         HttpSession session = request.getSession();
         session.setAttribute("userLogin", userLogin);
-        request.setAttribute("userLogin", userLogin);
 
         String javaScriptEnabled = null;
         try {
@@ -931,11 +925,6 @@ public class LoginWorker {
         if (externalKey == null) return "success";
 
         GenericValue userLogin = (GenericValue) LoginWorker.externalLoginKeys.get(externalKey);
-        // Work around for repeated login issue
-        if (userLogin == null) {
-            userLogin = (GenericValue) LoginWorker.externalLoginKeysWR.get(externalKey);
-            externalLoginKeysWR.remove(externalKey);
-        }
         if (userLogin != null) {
             //to check it's the right tenant
             //in case username and password are the same in different tenants