Author: jleroux Date: Mon Jan 7 21:59:32 2019 New Revision: 1850695 URL: http://svn.apache.org/viewvc?rev=1850695&view=rev Log: "Applied fix from trunk for revision: 1850694" ------------------------------------------------------------------------ r1850694 | jleroux | 2019-01-07 22:58:01 +0100 (lun. 07 janv. 2019) | 13 lignes
Fixed: Correct behaviour of Autologin cookies (OFBIZ-10635) Michael spotted that I used "default-server" in r1845558: Quoting him: It only works for webapps using "default-server". This name is configurable in the ofbiz-component.xml and and should not be hard-coded in the code. This fixes it Thanks: Michael Brohl ------------------------------------------------------------------------ Modified: ofbiz/ofbiz-framework/branches/release18.12/ (props changed) ofbiz/ofbiz-framework/branches/release18.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java Propchange: ofbiz/ofbiz-framework/branches/release18.12/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Jan 7 21:59:32 2019 @@ -10,4 +10,4 @@ /ofbiz/branches/json-integration-refactoring:1634077-1635900 /ofbiz/branches/multitenant20100310:921280-927264 /ofbiz/branches/release13.07:1547657 -/ofbiz/ofbiz-framework/trunk:1850015,1850023,1850530,1850647,1850685 +/ofbiz/ofbiz-framework/trunk:1850015,1850023,1850530,1850647,1850685,1850694 Modified: ofbiz/ofbiz-framework/branches/release18.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release18.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java?rev=1850695&r1=1850694&r2=1850695&view=diff ============================================================================== --- ofbiz/ofbiz-framework/branches/release18.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java (original) +++ ofbiz/ofbiz-framework/branches/release18.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java Mon Jan 7 21:59:32 2019 @@ -922,7 +922,8 @@ public class LoginWorker { Delegator delegator = (Delegator) request.getAttribute("delegator"); HttpSession session = request.getSession(); GenericValue userLogin = (GenericValue) session.getAttribute("userLogin"); - WebappInfo webappInfo = ComponentConfig.getWebappInfo("default-server", UtilHttp.getApplicationName(request)); + ServletContext context = request.getServletContext(); + WebappInfo webappInfo = ComponentConfig.getWebappInfo((String) context.getAttribute("_serverId"), UtilHttp.getApplicationName(request)); if (userLogin != null && webappInfo != null && webappInfo.isAutologinCookieUsed()) { Cookie autoLoginCookie = new Cookie(getAutoLoginCookieName(request), userLogin.getString("userLoginId"));