mirror of https://github.com/go-gitea/gitea.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
* Prevent double-login for Git HTTP and LFS and simplify login There are a number of inconsistencies with our current methods for logging in for git and lfs. The first is that there is a double login process. This is particularly evident in 1.13 where there are no less than 4 hash checks for basic authentication due to the previous IsPasswordSet behaviour. This duplicated code had individual inconsistencies that were not helpful and caused confusion. This PR does the following: * Remove the specific login code from the git and lfs handlers except for the lfs special bearer token * Simplify the meaning of DisableBasicAuthentication to allow Token and Oauth2 sign-in. * The removal of the specific code from git and lfs means that these both now have the same login semantics and can - if not DisableBasicAuthentication - login from external services. Further it allows Oauth2 token authentication as per our standard mechanisms. * The change in the recovery handler prevents the service from re-attempting to login - primarily because this could easily cause a further panic and it is wasteful. * add test Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Andrew Thornton <art27@cantab.net> |
4 years ago | |
---|---|---|
.. | ||
activity.go | 4 years ago | |
attachment.go | 4 years ago | |
blame.go | 4 years ago | |
branch.go | 4 years ago | |
commit.go | 4 years ago | |
compare.go | 4 years ago | |
download.go | 4 years ago | |
editor.go | 4 years ago | |
editor_test.go | 5 years ago | |
http.go | 4 years ago | |
issue.go | 4 years ago | |
issue_dependency.go | 5 years ago | |
issue_label.go | 4 years ago | |
issue_label_test.go | 4 years ago | |
issue_lock.go | 4 years ago | |
issue_stopwatch.go | 4 years ago | |
issue_test.go | 4 years ago | |
issue_timetrack.go | 4 years ago | |
issue_watch.go | 4 years ago | |
lfs.go | 4 years ago | |
main_test.go | 7 years ago | |
middlewares.go | 5 years ago | |
migrate.go | 4 years ago | |
milestone.go | 4 years ago | |
projects.go | 4 years ago | |
projects_test.go | 4 years ago | |
pull.go | 4 years ago | |
pull_review.go | 4 years ago | |
release.go | 4 years ago | |
release_test.go | 4 years ago | |
repo.go | 4 years ago | |
search.go | 4 years ago | |
setting.go | 4 years ago | |
setting_protected_branch.go | 4 years ago | |
settings_test.go | 4 years ago | |
topic.go | 4 years ago | |
view.go | 4 years ago | |
webhook.go | 4 years ago | |
wiki.go | 4 years ago | |
wiki_test.go | 4 years ago |