forgejo/tests
Giteabot 353dcc5ad4
Fix the error message when the token is incorrect (#25701) (#25836)
Backport #25701 by @CaiCandong

we refactored `userIDFromToken` for the token parsing part into a new
function `parseToken`. `parseToken` returns the string `token` from
request, and a boolean `ok` representing whether the token exists or
not. So we can distinguish between token non-existence and token
inconsistency in the `verfity` function, thus solving the problem of no
proper error message when the token is inconsistent.
close #24439  
related #22119

Co-authored-by: caicandong <50507092+CaiCandong@users.noreply.github.com>
Co-authored-by: Jason Song <i@wolfogre.com>
2023-07-12 10:18:27 +00:00
..
e2e
fuzz
gitea-lfs-meta
gitea-repositories-meta
integration Fix the error message when the token is incorrect (#25701) (#25836) 2023-07-12 10:18:27 +00:00
mssql.ini.tmpl
mysql.ini.tmpl
mysql8.ini.tmpl
pgsql.ini.tmpl
sqlite.ini.tmpl
test_utils.go Replace interface{} with any (#25686) (#25687) 2023-07-04 23:41:32 -04:00