forgejo/services
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
..
actions Add WithPullRequest for actionsNotifier (#25144) (#25196) 2023-06-12 23:23:43 +02:00
agit
asymkey Add context cache as a request level cache (#22294) 2023-02-15 21:37:34 +08:00
attachment Preserve file size when creating attachments (#23406) (#23426) 2023-03-12 12:45:39 +01:00
auth Fix the error message when the token is incorrect (#25701) (#25834) 2023-07-17 10:15:44 +02:00
automerge Add force_merge to merge request and fix checking mergable (#23010) 2023-02-21 08:42:07 -06:00
context Use User.ID instead of User.Name in ActivityPub API for Person IRI (#23823) (#23905) 2023-04-03 22:41:57 -05:00
convert Fix SyncOnCommit always return false in API of push_mirrors (#23088) (#23100) 2023-02-24 14:36:25 +08:00
cron [PRIVACY] Add a DNS method to fetch new updates 2023-05-10 11:04:40 +02:00
externalaccount
forms Title can be empty when creating tag only (#23917) (#23961) 2023-04-07 20:13:57 +08:00
gitdiff Fix broken code editor diff preview (#23307) (#23320) 2023-03-06 12:05:35 -06:00
issue Make DeleteIssue use correct context (#24885) 2023-05-30 08:11:44 +02:00
lfs Fix auth check bug (#24382) (#24387) 2023-04-27 17:49:50 -05:00
mailer [BRANDING] add X-Forgejo-* headers 2023-05-10 11:05:22 +02:00
markup
migrations GitLab migration: Sanitize response for reaction list (#25054) (#25059) 2023-06-05 15:44:19 +02:00
mirror Fix missing reference prefix of commits when sync mirror repository (#24994) 2023-05-30 08:11:45 +02:00
org
packages Use import of OCI structs (#22765) 2023-02-06 10:07:09 +00:00
pull Refresh the refernce of the closed PR when reopening (#24231) (#24587) 2023-05-08 12:48:06 +02:00
release Delete deleted release attachments immediately from storage (#23913) (#23958) 2023-04-06 18:38:34 -04:00
repository Make label templates have consistent behavior and priority (#23749) (#24071) 2023-04-12 16:05:10 +02:00
task
user Add context cache as a request level cache (#22294) 2023-02-15 21:37:34 +08:00
webhook Fix incorrect webhook time and use relative-time to display it (#24477) 2023-07-03 13:01:10 +02:00
wiki Fix bug when deleting wiki with no code write permission (#24274) (#24295) 2023-04-23 20:20:45 -04:00