Panic when admin tries to delete a user with purge=true #9251

Closed
opened 2025-11-02 08:33:18 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @dhruvmanila on GitHub (Jul 21, 2022).

Description

As an admin, when you try to delete a user with purge=true, it panics. This is done using the API, so the url would be something like https://localhost:3000/api/v1/admin/users/foo?purge=true.

Gitea Version

c0f5111fea

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/dhruvmanila/9c8a2c45dd31247dd993cfbfa3db2922

Screenshots

No response

Git Version

No response

Operating System

macOS

How are you running Gitea?

Running locally using make watch command on the command-line.

Steps to reproduce:

  1. Create an admin user
  2. Create 2 non-admin user
  3. Using httpie, run http :3000/api/v1/admin/users/{username}?purge=false --auth username:password for the first user and then use purge=true for the second user

When purge is true, it panics.

Database

PostgreSQL

Originally created by @dhruvmanila on GitHub (Jul 21, 2022). ### Description As an admin, when you try to delete a user with `purge=true`, it panics. This is done using the API, so the url would be something like `https://localhost:3000/api/v1/admin/users/foo?purge=true`. ### Gitea Version c0f5111fea0b742a60113e1bda81bf39607d6ca8 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist https://gist.github.com/dhruvmanila/9c8a2c45dd31247dd993cfbfa3db2922 ### Screenshots _No response_ ### Git Version _No response_ ### Operating System macOS ### How are you running Gitea? Running locally using `make watch` command on the command-line. Steps to reproduce: 1. Create an admin user 2. Create 2 non-admin user 3. Using [`httpie`](https://httpie.io/), run `http :3000/api/v1/admin/users/{username}?purge=false --auth username:password` for the first user and then use `purge=true` for the second user When purge is true, it panics. ### Database PostgreSQL
GiteaMirror added the type/bug label 2025-11-02 08:33:18 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9251