|
[ https://issues.apache.org/jira/browse/OFBIZ-10666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16741278#comment-16741278 ] Jacques Le Roux commented on OFBIZ-10666: ----------------------------------------- Thanks Deepak, Got it w/ your 1st link, it's troublesome. The Javadoc is really not well done and should speak about this aspect rather than simply telling us {quote} Gets the maximum age in seconds of this Cookie. By default, -1 is returned, which indicates that the cookie will persist until browser shutdown. Returns:an integer specifying the maximum age of the cookie in seconds; if negative, means the cookie persists until browser shutdown {quote} misleading! Anyway, because if the cookie is still valid we will get its name, I think we are good to remove getMaxAge as in the patch below {code} Index: framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java =================================================================== --- framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java (révision 1851160) +++ framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java (copie de travail) @@ -975,8 +975,7 @@ } if (cookies != null) { for (Cookie cookie: cookies) { - if (cookie.getName().equals(getAutoLoginCookieName(request)) - && cookie.getMaxAge() > 0) { + if (cookie.getName().equals(getAutoLoginCookieName(request))) { autoUserLoginId = cookie.getValue(); break; } {code} I'll commit soon. This said it's also used in CrossSubdomainSessionValve::replaceCookie, not sure it's an issue or not there. > User's name is displayed on ecommerce even after user logs out > -------------------------------------------------------------- > > Key: OFBIZ-10666 > URL: https://issues.apache.org/jira/browse/OFBIZ-10666 > Project: OFBiz > Issue Type: Bug > Components: ecommerce > Affects Versions: Trunk > Reporter: Arpit Mor > Assignee: Jacques Le Roux > Priority: Major > Fix For: 17.12.01, 16.11.06 > > Attachments: 1-OpenURL.png, 2-LoggedIn.png, 3-LoggedOut.png, 4-NotYou.png, OFBIZ-10666.patch > > > Steps to regenerate: > # Open URL: [https://demo-trunk.ofbiz.apache.org/ecommerce/control/main]. Welcome is displayed and user's name is not displayed when URL is opened. (Please refer attachment: 1-OpenURL) > # Login at ecommerce by clicking on login and entering Username: "admin" and Password: "ofbiz". Username will be displayed after user logs in. (Please refer attachment: 2-LoggedIn) > # Logout of ecommerce by clicking on logout. User will be logged out and login link will be displayed in place of logout link, but the name of user is still displayed. (Please refer attachment: 3-LoggedOut) > Actual: Username is still displayed after user logs out > > Expected: Username should not be displayed after the user logs out > > Note: Similar issue also exists when the user clicks on (Not You? Click Here) link. (Please refer attachment: 4-NotYou) -- This message was sent by Atlassian JIRA (v7.6.3#76005) |
| Free forum by Nabble | Edit this page |
