mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-17 11:59:30 +00:00
Remove check for negative length (#5120)
This commit is contained in:
parent
583b1b8429
commit
5a4648cdd6
7 changed files with 8 additions and 8 deletions
|
@ -80,7 +80,7 @@ import (
|
|||
func sudo() macaron.Handler {
|
||||
return func(ctx *context.APIContext) {
|
||||
sudo := ctx.Query("sudo")
|
||||
if len(sudo) <= 0 {
|
||||
if len(sudo) == 0 {
|
||||
sudo = ctx.Req.Header.Get("Sudo")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue