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



##########
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:
       Nevermind I tested, this will break if path is restricted to /client 
only; ideally shoud match the webapp context path




----------------------------------------------------------------
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:
[email protected]


Reply via email to