Add remember me cookie assertions#97
Closed
mdchaney wants to merge 4 commits intostevepolitodesign:mainfrom
Closed
Add remember me cookie assertions#97mdchaney wants to merge 4 commits intostevepolitodesign:mainfrom
mdchaney wants to merge 4 commits intostevepolitodesign:mainfrom
Conversation
Asserts cookie is http_only, secure, and same-site is "strict". Closes stevepolitodesign#87.
|
|
||
| def store_location | ||
| session[:user_return_to] = request.original_url if request.get? && request.local? | ||
| session[:user_return_to] = request.original_url if request.get? |
There was a problem hiding this comment.
Was this meant to be part of #96?
Author
There was a problem hiding this comment.
Yes. Ignore this mess for now.
Comment on lines
+48
to
+52
| remember_me_cookie = cookies.get_cookie("remember_token") | ||
|
|
||
| assert remember_me_cookie.http_only? | ||
| assert remember_me_cookie.secure? | ||
| assert_equal "Strict", remember_me_cookie.to_h["SameSite"] |
There was a problem hiding this comment.
I'm surprised this passed, since it doesn't look like the implementation changed?
Owner
Author
There was a problem hiding this comment.
Didn't pass. I tested this in the wrong directory (long story). I'm going to fix this.
1. Set to "secure" in production 2. Set to HttpOnly 3. SameSite set to strict. Closes stevepolitodesign#87.
Author
|
Makeing a new pull request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Just adds the assertions mentioned in #87.