Skip to content
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

Sanitize cookie names. #2216

Merged

Conversation

timoreimann
Copy link
Contributor

According to RFC 2616 section 2.2 and this StackOverflow response, only a certain subset of characters is permitted in cookie names. Specifically, slashes contained may cause the cookie to not get set by certain browsers.

This change makes sure that the backend name embedded in the cookie name is sanitized accordingly.

Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@mmatur mmatur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@emilevauge emilevauge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @timoreimann
LGTM

Copy link
Member

@juliens juliens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

According to RFC 2616 section 2.2 and [1], only a certain subset of
characters is permitted in cookie names. Specifically, slashes contained
may cause the cookie to not get set by certain browsers.

This change makes sure that the backend name embedded in the cookie name
is sanitized accordingly.

[1] https://stackoverflow.com/a/1969339
@traefiker traefiker force-pushed the sanitize-sticky-cookie-backend-name branch from 4af7e48 to c63408d Compare October 5, 2017 10:02
@traefiker traefiker merged commit 8a67434 into traefik:v1.4 Oct 5, 2017
@timoreimann timoreimann deleted the sanitize-sticky-cookie-backend-name branch October 5, 2017 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants