svn commit: r700552 - /ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r700552 - /ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java

lektran
Author: lektran
Date: Tue Sep 30 12:10:07 2008
New Revision: 700552

URL: http://svn.apache.org/viewvc?rev=700552&view=rev
Log:
Set the autoLoginCookie's domain to what is specified in url.properties

Modified:
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java

Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java?rev=700552&r1=700551&r2=700552&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java Tue Sep 30 12:10:07 2008
@@ -519,9 +519,11 @@
         GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
         HttpSession session = request.getSession();
         GenericValue userLogin = (GenericValue) session.getAttribute("userLogin");
+        String domain = UtilProperties.getPropertyValue("url.properties", "cookie.domain");
         if (userLogin != null) {
             Cookie autoLoginCookie = new Cookie(getAutoLoginCookieName(request), userLogin.getString("userLoginId"));
             autoLoginCookie.setMaxAge(60 * 60 * 24 * 365);
+            autoLoginCookie.setDomain(domain);
             autoLoginCookie.setPath("/");
             response.addCookie(autoLoginCookie);
             return autoLoginCheck(delegator, session, userLogin.getString("userLoginId"));