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 ee87b4e18c
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>
11 months ago
..
actions Add `WithPullRequest` for `actionsNotifier` (#25144) (#25196) 1 year ago
agit Rename almost all Ctx functions (#22071) 2 years ago
asymkey Add context cache as a request level cache (#22294) 1 year ago
attachment Preserve file size when creating attachments (#23406) (#23426) 1 year ago
auth Fix the error message when the token is incorrect (#25701) (#25834) 11 months ago
automerge Add force_merge to merge request and fix checking mergable (#23010) 1 year ago
context Use User.ID instead of User.Name in ActivityPub API for Person IRI (#23823) (#23905) 1 year ago
convert Fix SyncOnCommit always return false in API of push_mirrors (#23088) (#23100) 1 year ago
cron Add Cargo package registry (#21888) 1 year ago
externalaccount Implement FSFE REUSE for golang files (#21840) 2 years ago
forms Title can be empty when creating tag only (#23917) (#23961) 1 year ago
gitdiff Fix broken code editor diff preview (#23307) (#23320) 1 year ago
issue Make DeleteIssue use correct context (#24885) 1 year ago
lfs Fix auth check bug (#24382) (#24387) 1 year ago
mailer Preserve file size when creating attachments (#23406) (#23426) 1 year ago
markup Implement FSFE REUSE for golang files (#21840) 2 years ago
migrations GitLab migration: Sanitize response for reaction list (#25054) (#25059) 1 year ago
mirror Fix missing reference prefix of commits when sync mirror repository (#24994) 1 year ago
org Implement FSFE REUSE for golang files (#21840) 2 years ago
packages Use import of OCI structs (#22765) 1 year ago
pull Refresh the refernce of the closed PR when reopening (#24231) (#24587) 1 year ago
release Delete deleted release attachments immediately from storage (#23913) (#23958) 1 year ago
repository Make label templates have consistent behavior and priority (#23749) (#24071) 1 year ago
task Implement FSFE REUSE for golang files (#21840) 2 years ago
user Add context cache as a request level cache (#22294) 1 year ago
webhook Fix incorrect `HookEventType` of pull request review comments (#23650) (#23678) 1 year ago
wiki Fix bug when deleting wiki with no code write permission (#24274) (#24295) 1 year ago