Reset Session ID on login#18018
Merged
lunny merged 10 commits intogo-gitea:mainfrom Dec 20, 2021
Merged
Conversation
wxiaoguang
reviewed
Dec 18, 2021
Contributor
There was a problem hiding this comment.
- should it be
oldUID? - I haven't understood the real usage of
_old_uid....
Contributor
Author
There was a problem hiding this comment.
I can't completely remember its uses but I've changed the code to avoid having to copy this.
c222614 to
5e44779
Compare
When logging in the SessionID should be reset and the session cleaned up. Signed-off-by: Andrew Thornton <art27@cantab.net>
5e44779 to
a63ce34
Compare
This comment has been minimized.
This comment has been minimized.
Codecov Report
@@ Coverage Diff @@
## main #18018 +/- ##
=======================================
Coverage ? 45.17%
=======================================
Files ? 824
Lines ? 91436
Branches ? 0
=======================================
Hits ? 41305
Misses ? 43536
Partials ? 6595
Continue to review full report at Codecov.
|
This comment has been minimized.
This comment has been minimized.
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
… account linking pages too Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
lunny
reviewed
Dec 19, 2021
lunny
reviewed
Dec 19, 2021
Signed-off-by: Andrew Thornton <art27@cantab.net>
techknowlogick
approved these changes
Dec 20, 2021
Member
|
I found if user enabled 2fa, the sessionid changed when password checked. But when second verify checked, session id will not changed. |
lunny
approved these changes
Dec 20, 2021
zeripath
added a commit
to zeripath/gitea
that referenced
this pull request
Dec 20, 2021
* Reset Session ID on login When logging in the SessionID should be reset and the session cleaned up. Signed-off-by: Andrew Thornton <art27@cantab.net> * with new session.RegenerateID function Signed-off-by: Andrew Thornton <art27@cantab.net> * update go-chi/session Signed-off-by: Andrew Thornton <art27@cantab.net> * Ensure that session id is changed after oauth data is set and between account linking pages too Signed-off-by: Andrew Thornton <art27@cantab.net> * placate lint Signed-off-by: Andrew Thornton <art27@cantab.net> * as per review Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath
added a commit
that referenced
this pull request
Dec 20, 2021
zeripath
added a commit
to zeripath/gitea
that referenced
this pull request
Dec 20, 2021
Add:
* Move POST /{username}/action/{action} to simply POST /{username} (go-gitea#18045) (go-gitea#18046)
* Fix delete u2f keys bug (go-gitea#18040) (go-gitea#18042)
* Reset Session ID on login (go-gitea#18018) (go-gitea#18041)
* Prevent off-by-one error on comments on newly appended lines (go-gitea#18029) (go-gitea#18035)
Signed-off-by: Andrew Thornton <art27@cantab.net>
Merged
Chianina
pushed a commit
to Chianina/gitea
that referenced
this pull request
Mar 28, 2022
* Reset Session ID on login When logging in the SessionID should be reset and the session cleaned up. Signed-off-by: Andrew Thornton <art27@cantab.net> * with new session.RegenerateID function Signed-off-by: Andrew Thornton <art27@cantab.net> * update go-chi/session Signed-off-by: Andrew Thornton <art27@cantab.net> * Ensure that session id is changed after oauth data is set and between account linking pages too Signed-off-by: Andrew Thornton <art27@cantab.net> * placate lint Signed-off-by: Andrew Thornton <art27@cantab.net> * as per review Signed-off-by: Andrew Thornton <art27@cantab.net>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
When logging in the SessionID should be reset and the session cleaned up.
Also logs the user in on completion of linking account
Signed-off-by: Andrew Thornton art27@cantab.net