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.
gitea/services
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>
2 years ago
..
actions For API attachments, use API URL (#25639) (#25814) 2 years ago
agit Use the type RefName for all the needed places and fix pull mirror sync bugs (#24634) 2 years ago
asymkey Add context cache as a request level cache (#22294) 2 years ago
attachment Preserve file size when creating attachments (#23406) 2 years ago
auth Fix the error message when the token is incorrect (#25701) (#25836) 2 years ago
automerge Improve queue and logger context (#24924) 2 years ago
context Replace `interface{}` with `any` (#25686) (#25687) 2 years ago
convert For API attachments, use API URL (#25639) (#25814) 2 years ago
cron Replace `interface{}` with `any` (#25686) (#25687) 2 years ago
externalaccount Replace `interface{}` with `any` (#25686) (#25687) 2 years ago
forms Use "utf8mb4" for MySQL by default (#25432) 2 years ago
gitdiff Show outdated comments in files changed tab (#24936) (#25428) 2 years ago
issue Rename NotifyPullReviewRequest to NotifyPullRequestReviewRequest (#24988) 2 years ago
lfs Replace `interface{}` with `any` (#25686) (#25687) 2 years ago
mailer Replace `interface{}` with `any` (#25686) (#25687) 2 years ago
markup Decouple the different contexts from each other (#24786) 2 years ago
migrations Replace `interface{}` with `any` (#25686) (#25687) 2 years ago
mirror Replace `interface{}` with `any` (#25686) (#25687) 2 years ago
org Refactor rename user and rename organization (#24052) 2 years ago
packages Replace `interface{}` with `any` (#25686) (#25687) 2 years ago
pull Avoid amending the Rebase and Fast-forward merge if there is no message template (#25779) (#25809) 2 years ago
release Use the type RefName for all the needed places and fix pull mirror sync bugs (#24634) 2 years ago
repository Replace `interface{}` with `any` (#25686) (#25687) 2 years ago
task Replace `interface{}` with `any` (#25686) (#25687) 2 years ago
user Refactor rename user and rename organization (#24052) 2 years ago
webhook For API attachments, use API URL (#25639) (#25814) 2 years ago
wiki Improve wiki user title test (#24559) 2 years ago