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

Safari csrf problems (setting cookie _csrf_token) #17

Open
afterdesign opened this issue Jul 8, 2016 · 0 comments
Open

Safari csrf problems (setting cookie _csrf_token) #17

afterdesign opened this issue Jul 8, 2016 · 0 comments
Assignees

Comments

@afterdesign
Copy link

_csrf_token cookie is not set properly in safari browser when path is bytes not str.

Function generate_csrf_token is getting path configuration from get_conf:

csrf_path = conf.get('csrf.path', ROOT).encode(ENCODING)

When I'm converting bytes to str in generate_csrf_token cookie is set correctly.

response.set_cookie(token_name, token, path=path.decode(),
                        secret=secret, max_age=expires)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants