1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-10-05 19:30:58 +00:00
forgejo/routers/api
Gusted 421cfba3cf fix: return error when user is not repo writer (#8690)
- If the doer isn't a issue/pull writer, return a error.
- Fixes a panic (NPE), because the callers of `prepareForReplaceOrAdd` simply checked if there was a error returned to see if the user was allowed. It didn't check if a statuscode was written. This is specifically a issue when the automatic token by Forgejo actions is used.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8690
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-07-27 10:17:33 +02:00
..
actions chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
forgejo/v1 chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
packages fix: storage(minio): prevent io.Reader close (#8541) 2025-07-17 12:31:38 +02:00
shared fix: query token auth version mismatch (#8666) 2025-07-25 12:24:26 +02:00
v1 fix: return error when user is not repo writer (#8690) 2025-07-27 10:17:33 +02:00