mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-03 00:02:43 +02:00
Fix various permission & login related bugs (#36002)
Permission & protection check:
- Fix Delete Release permission check
- Fix Update Pull Request with rebase branch protection check
- Fix Issue Dependency permission check
- Fix Delete Comment History ID check
Information leaking:
- Show unified message for non-existing user and invalid password
- Fix #35984
- Don't expose release draft to non-writer users.
- Make API returns signature's email address instead of the user
profile's.
Auth & Login:
- Avoid GCM OAuth2 attempt when OAuth2 is disabled
- Fix #35510
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
1 parent
a60a8c6966
commit
62d750eadb
18 files changed
+385
-61
No files matched your search
@@ -271,8 +271,8 @@ type RequestWrapper struct {
|
||||
*http.Request
|
||||
}
|
||||
|
||||
func (req *RequestWrapper) AddBasicAuth(username string) *RequestWrapper {
|
||||
req.Request.SetBasicAuth(username, userPassword)
|
||||
func (req *RequestWrapper) AddBasicAuth(username string, password ...string) *RequestWrapper {
|
||||
req.Request.SetBasicAuth(username, util.OptionalArg(password, userPassword))
|
||||
return req
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user