-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Prevent creating empty sessions #6677
Prevent creating empty sessions #6677
Conversation
Signed-off-by: Andrew Thornton <[email protected]>
Signed-off-by: Andrew Thornton <[email protected]>
…/gitea into prevent-creating-empty-sessions
Codecov Report
@@ Coverage Diff @@
## master #6677 +/- ##
=========================================
Coverage ? 40.87%
=========================================
Files ? 420
Lines ? 57454
Branches ? 0
=========================================
Hits ? 23486
Misses ? 30841
Partials ? 3127
Continue to review full report at Codecov.
|
Could you add some integration tests to confirm the unlogin page didn't create session but logined page did? |
@lunny it seems that's not an easy thing to do. Our integration tests run with the memory session provider which does not appear to be interrogatable. However, I've done it. |
Signed-off-by: Andrew Thornton <[email protected]>
Tests are up. And they broke the rest of the tests... That'll teach me to just test the single tests themselves... |
Signed-off-by: Andrew Thornton <[email protected]>
Tests now working. |
@zeripath thanks |
* Prevent creating empty sessions Signed-off-by: Andrew Thornton <[email protected]> * Update modules/setting/session.go * Remove unnecessary option Signed-off-by: Andrew Thornton <[email protected]> * Add destory to list of ignored misspellings * rename cookie.go -> virtual.go * Delete old file * Add test to ensure that sessions are not created without being logged in Signed-off-by: Andrew Thornton <[email protected]> * fix tests Signed-off-by: Andrew Thornton <[email protected]> * Update integrations/create_no_session_test.go
Backport #6677 Signed-off-by: Andrew Thornton <[email protected]>
* Dump: Use mholt/archive/v3 to support tar including many compressions Signed-off-by: Philipp Homann <[email protected]> * Dump: Allow dump output to stdout Signed-off-by: Philipp Homann <[email protected]> * Dump: Fixed bug present since #6677 where SessionConfig.Provider is never "file" Signed-off-by: Philipp Homann <[email protected]> * Dump: never pack RepoRootPath, LFS.ContentPath and LogRootPath when they are below AppDataPath Signed-off-by: Philipp Homann <[email protected]> * Dump: also dump LFS (fixes #10058) Signed-off-by: Philipp Homann <[email protected]> * Dump: never dump CustomPath if CustomPath is a subdir of or equal to AppDataPath (fixes #10365) Signed-off-by: Philipp Homann <[email protected]> * Use log.Info instead of fmt.Fprintf Signed-off-by: Philipp Homann <[email protected]> * import ordering * make fmt Co-authored-by: zeripath <[email protected]> Co-authored-by: techknowlogick <[email protected]> Co-authored-by: Matti R <[email protected]>
* Dump: Use mholt/archive/v3 to support tar including many compressions Signed-off-by: Philipp Homann <[email protected]> * Dump: Allow dump output to stdout Signed-off-by: Philipp Homann <[email protected]> * Dump: Fixed bug present since go-gitea#6677 where SessionConfig.Provider is never "file" Signed-off-by: Philipp Homann <[email protected]> * Dump: never pack RepoRootPath, LFS.ContentPath and LogRootPath when they are below AppDataPath Signed-off-by: Philipp Homann <[email protected]> * Dump: also dump LFS (fixes go-gitea#10058) Signed-off-by: Philipp Homann <[email protected]> * Dump: never dump CustomPath if CustomPath is a subdir of or equal to AppDataPath (fixes go-gitea#10365) Signed-off-by: Philipp Homann <[email protected]> * Use log.Info instead of fmt.Fprintf Signed-off-by: Philipp Homann <[email protected]> * import ordering * make fmt Co-authored-by: zeripath <[email protected]> Co-authored-by: techknowlogick <[email protected]> Co-authored-by: Matti R <[email protected]>
Signed-off-by: Andrew Thornton [email protected]