-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HPCC-31349 Change Path property for all cookies #18479
HPCC-31349 Change Path property for all cookies #18479
Conversation
Set Path for all cookies to "/" (the root of the domain) so that all cookies returned by ESP are scoped for the entire domain, rather than sometimes being "/" and sometimes being "/esp/files". Signed-off-by: Jeremy Clements <[email protected]>
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-31349 Jirabot Action Result: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeclrsg please see my comment.
@@ -1565,11 +1565,10 @@ void CHttpRequest::parseCookieHeader(char* cookiestr) | |||
if(name.charAt(0) != '$') | |||
{ | |||
cookie = new CEspCookie(name.str(), value.str()); | |||
cookie->setPath("/"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure whether this will change anything. The Path has been set to '/' when new a CEspCookie (
HPCC-Platform/esp/platform/espsession.ipp
Line 57 in e28c39e
m_path.set("/"); |
cookie->setVersion(version); | ||
m_cookies.append(*cookie); | ||
} | ||
else if(stricmp(name.str(), "$Path") == 0 && cookie != NULL) | ||
cookie->setPath(value.str()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure whether it is safe or not, The existing code uses the Path in the appendToRequestHeader() and appendToResponseHeader(). What if a third party ESP client needs it?
@jeclrsg what is the status of this PR? It is still marked as a draft. Should it be closed? |
Set Path for all cookies to "/" (the root of the domain) so that all cookies returned by ESP are scoped for the entire domain, rather than sometimes being "/" and sometimes being "/esp/files".
Type of change:
Checklist:
Smoketest:
Testing: