TFNS / CTFNote

CTFNote is a collaborative tool aiming to help CTF teams to organise their work.
GNU General Public License v3.0
505 stars 56 forks source link

Cannot delete user #255

Open peace-maker opened 2 months ago

peace-maker commented 2 months ago

When clicking the trashbin icon on a user row in /#/admin/users the user is not deleted.

db-1        | 2024-04-30 14:28:03.200 UTC [890] ERROR:  cannot cast type record to user_response
db-1        | 2024-04-30 14:28:03.200 UTC [890] DETAIL:  Input has too few columns.
db-1        | 2024-04-30 14:28:03.200 UTC [890] CONTEXT:  SQL function "delete_user" during startup
db-1        | 2024-04-30 14:28:03.200 UTC [890] STATEMENT:  with __local_0__ as (select __local_1__.* from "ctfnote"."delete_user"($1) __local_1__) select ((case when __local_0__ is null then null else __local_0__ end))::text from __local_0__
JJ-8 commented 1 month ago

@peace-maker, in my production instance I could successfully delete a user. Is this an issue in your development instance? If so, can you wipe your database by deleting the docker volume and create a new database/volume? I suspect the issue should then be gone. If this is in your production instance, I wonder how this could have happened. Maybe cached JS that sends too few data to the server?