Author: jonesde
Date: Fri Apr 27 00:21:33 2007
New Revision: 532996
URL:
http://svn.apache.org/viewvc?view=rev&rev=532996Log:
Applied fix from trunk for revision: 532993
Modified:
ofbiz/branches/release4.0/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
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=532996&r1=532995&r2=532996==============================================================================
--- 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 00:21:33 2007
@@ -347,6 +347,11 @@
// if previous request exists, and a login just succeeded, do that now.
if (previousRequest != null && loginPass != null && loginPass.equalsIgnoreCase("TRUE")) {
+ // 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);
+ previousRequest = null;
+ }
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);