Error 500 when accessing /api/v1/repos/:org/:repo/releases after deleting user #4910

Closed
opened 2025-11-02 06:06:56 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @bucciarati on GitHub (Feb 21, 2020).

  • Gitea version (or commit ref): 1.10.4
  • Git version: 2.20.1
  • Operating system: CentOS 7
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes
    • No
    • Not relevant (can't delete users on try.gitea.io)
  • Log gist:
$ curl --include "https://XXXX/api/v1/repos/ORG/REPO/releases?access_token=XXXXXXXX"
HTTP/1.1 500 [...]
{"message":"user does not exist [uid: 16, name: , keyid: 0]","url":"https://XXXX/api/swagger"}

Description

  1. create a release with user joe in some repository
  2. as instance admin, delete user joe
  3. visit gitea/org/repo/releases, notice release is now by Ghost
  4. curl --include "https://XXXX/api/v1/repos/ORG/REPO/releases?access_token=XXXXXXXX"
  5. get error 500

Looking into the release table it looks like there are releases with publisher_id=16 (where 16 was the ID of the deleted user joe).

Originally created by @bucciarati on GitHub (Feb 21, 2020). - Gitea version (or commit ref): 1.10.4 - Git version: 2.20.1 - Operating system: CentOS 7 - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes - [ ] No - [x] Not relevant (can't delete users on try.gitea.io) - Log gist: ``` $ curl --include "https://XXXX/api/v1/repos/ORG/REPO/releases?access_token=XXXXXXXX" HTTP/1.1 500 [...] {"message":"user does not exist [uid: 16, name: , keyid: 0]","url":"https://XXXX/api/swagger"} ``` ## Description 1. create a release with user `joe` in some repository 1. as instance admin, delete user `joe` 1. visit gitea/org/repo/releases, notice release is now by `Ghost` 1. curl --include "https://XXXX/api/v1/repos/ORG/REPO/releases?access_token=XXXXXXXX" 1. get error 500 Looking into the `release` table it looks like there are releases with `publisher_id=16` (where 16 was the ID of the deleted user `joe`).
GiteaMirror added the issue/stale label 2025-11-02 06:06:56 -06:00
Author
Owner

@lunny commented on GitHub (Feb 21, 2020):

Could you upgrade to v1.11.1?

@lunny commented on GitHub (Feb 21, 2020): Could you upgrade to v1.11.1?
Author
Owner

@stale[bot] commented on GitHub (Apr 23, 2020):

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale[bot] commented on GitHub (Apr 23, 2020): This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
Author
Owner

@stale[bot] commented on GitHub (May 7, 2020):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (May 7, 2020): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4910