-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Support secure cookie for csrf-token #3839
Conversation
Thank you for your pull request! And thanks for spotting the problem - I created #3833 yesterday (perhaps you didn't see it?). In any case, we should not modify vendor dependencies directly - we should try to modify the upstream repo first then pull it on Gitea (and Unknwon seems to be in the part of the year where he's actually active on the internet, so if you make PRs they have a chance to be merged). Can you please do it on that repo and then pull the changes with Govendor? |
Yes, first PR in go-macron should be submitted and only than when it's merged we can do govendor fetch to update dependency from upstream |
@thehowl,
I've created go-macaron/csrf#7 |
@AleksandrBulyshchenko upstream PR seems to have been merged. Can you update deps with govendor on this PR? Many thanks! |
47fdbb7
to
409cf99
Compare
@thehowl, But as I can see build verification has failed - probably it requires projects in GOPATH on build server to be in sync. |
did you use |
yes, exactly |
@AleksandrBulyshchenko The project is now using cc: @sapk |
Update github.com/go-macaron/csrf with dep to revision 503617c6b372 to fix issue of csrf-token security. This update includes following commits: - Add support for the Cookie HttpOnly flag - Support secure mode for csrf cookie Signed-off-by: Aleksandr Bulyshchenko <[email protected]>
Signed-off-by: Aleksandr Bulyshchenko <[email protected]>
409cf99
to
c8d7625
Compare
|
Codecov Report
@@ Coverage Diff @@
## master #3839 +/- ##
==========================================
+ Coverage 20.05% 20.06% +<.01%
==========================================
Files 153 153
Lines 30344 30122 -222
==========================================
- Hits 6086 6044 -42
+ Misses 23345 23168 -177
+ Partials 913 910 -3
Continue to review full report at Codecov.
|
Fixes #1734
Currently SetCookie for csrf has secure hardcodded to false.
This passes security argument to cookie creation and set it by COOKIE_SECURE config var.