Author: jonesde
Date: Fri Apr 27 23:17:45 2007 New Revision: 533306 URL: http://svn.apache.org/viewvc?view=rev&rev=533306 Log: Applied fix from trunk for revision: 533305 Modified: ofbiz/branches/release4.0/framework/common/src/org/ofbiz/common/login/LoginServices.java ofbiz/branches/release4.0/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java Modified: ofbiz/branches/release4.0/framework/common/src/org/ofbiz/common/login/LoginServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/framework/common/src/org/ofbiz/common/login/LoginServices.java?view=diff&rev=533306&r1=533305&r2=533306 ============================================================================== --- ofbiz/branches/release4.0/framework/common/src/org/ofbiz/common/login/LoginServices.java (original) +++ ofbiz/branches/release4.0/framework/common/src/org/ofbiz/common/login/LoginServices.java Fri Apr 27 23:17:45 2007 @@ -263,6 +263,7 @@ ulhCreateMap.put("passwordUsed", password); } + //Debug.logInfo(new Exception(), "=================== Creating new UserLoginHistory at " + UtilDateTime.nowTimestamp(), module); delegator.create("UserLoginHistory", ulhCreateMap); } } Modified: ofbiz/branches/release4.0/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java?view=diff&rev=533306&r1=533305&r2=533306 ============================================================================== --- ofbiz/branches/release4.0/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java (original) +++ ofbiz/branches/release4.0/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java Fri Apr 27 23:17:45 2007 @@ -347,15 +347,16 @@ // if previous request exists, and a login just succeeded, do that now. if (previousRequest != null && loginPass != null && loginPass.equalsIgnoreCase("TRUE")) { + request.getSession().removeAttribute("_PREVIOUS_REQUEST_"); // special case to avoid login/logout looping: if request was "logout" before the login, change to null for default success view; do the same for "login" to avoid going back to the same page if ("logout".equals(previousRequest) || "/logout".equals(previousRequest) || "login".equals(previousRequest) || "/login".equals(previousRequest) || "checkLogin".equals(previousRequest) || "/checkLogin".equals(previousRequest)) { - Debug.logWarning("Found special _PREVIOUS_REQUEST_ of [" + previousRequest + "], setting to null to avoid problems", module); + Debug.logWarning("Found special _PREVIOUS_REQUEST_ of [" + previousRequest + "], setting to null to avoid problems, not running request again", module); previousRequest = null; + } else { + if (Debug.infoOn()) Debug.logInfo("[Doing Previous Request]: " + previousRequest + " sessionId=" + UtilHttp.getSessionId(request), module); + doRequest(request, response, previousRequest, userLogin, delegator); + return; // this is needed or else we will run the view twice } - request.getSession().removeAttribute("_PREVIOUS_REQUEST_"); - if (Debug.infoOn()) Debug.logInfo("[Doing Previous Request]: " + previousRequest + " sessionId=" + UtilHttp.getSessionId(request), module); - doRequest(request, response, previousRequest, userLogin, delegator); - return; // this is needed or else we will run the view twice } String successView = requestManager.getViewName(requestUri); |
Free forum by Nabble | Edit this page |