You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/06/25 07:14:55 UTC

[GitHub] [cloudstack] davidjumani commented on a change in pull request #4176: server: Purge all cookies on logout, set /client path on login

davidjumani commented on a change in pull request #4176:
URL: https://github.com/apache/cloudstack/pull/4176#discussion_r445352415



##########
File path: server/src/main/java/com/cloud/api/ApiServlet.java
##########
@@ -213,7 +213,7 @@ void processRequestInContext(final HttpServletRequest req, final HttpServletResp
                     try {
                         responseString = apiAuthenticator.authenticate(command, params, session, remoteAddress, responseType, auditTrailSb, req, resp);
                         if (session != null && session.getAttribute(ApiConstants.SESSIONKEY) != null) {
-                            resp.addHeader("SET-COOKIE", String.format("%s=%s;HttpOnly", ApiConstants.SESSIONKEY, session.getAttribute(ApiConstants.SESSIONKEY)));
+                            resp.addHeader("SET-COOKIE", String.format("%s=%s;HttpOnly;Path=/client", ApiConstants.SESSIONKEY, session.getAttribute(ApiConstants.SESSIONKEY)));

Review comment:
       Looks like it is necessary, if not present, two sessionkeys are present
   If non-standard implementations are the case, wouldn't JSESSIONID cause issues too?
   Also exploring saml logins




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org