forgejo/tests
Giteabot 968ab550e5
Fix the error message when the token is incorrect (#25701) (#25834)
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>
(cherry picked from commit ee87b4e18c)
2023-07-17 10:15:44 +02:00
..
e2e Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
fuzz Move fuzz tests into tests/fuzz (#22376) 2023-01-09 15:30:14 +08:00
gitea-lfs-meta Test views of LFS files (#22196) 2022-12-23 07:41:56 +08:00
gitea-repositories-meta fix calReleaseNumCommitsBehind (#24148) (#24197) 2023-04-22 12:30:24 -04:00
integration Fix the error message when the token is incorrect (#25701) (#25834) 2023-07-17 10:15:44 +02:00
mssql.ini.tmpl [CI] set PASSWORD_HASH_ALGO = argon2 for integration tests 2023-05-10 07:23:38 +02:00
mysql.ini.tmpl [CI] set PASSWORD_HASH_ALGO = argon2 for integration tests 2023-05-10 07:23:38 +02:00
mysql8.ini.tmpl [CI] set PASSWORD_HASH_ALGO = argon2 for integration tests 2023-05-10 07:23:38 +02:00
pgsql.ini.tmpl [CI] set PASSWORD_HASH_ALGO = argon2 for integration tests 2023-05-10 07:23:38 +02:00
sqlite.ini.tmpl [CI] set PASSWORD_HASH_ALGO = argon2 for integration tests 2023-05-10 07:23:38 +02:00
test_utils.go Refactor setting.Database.UseXXX to methods (#23354) (#23356) 2023-03-07 20:11:44 +08:00
testlogger.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00