nginx-proxy-manager
nginx-proxy-manager copied to clipboard
Hosts of a deleted user break the host list
Re-issued #1038 Because it is not fixed , and owner of that issue is not reopening .
This annoying bug breaks NPM rendering anyone unable to change , very bad for production environment. Please consider looking into it.
I can confirm this issue, after deleting an old admin user I get the error: Cannot read properties of null (reading 'avatar')
@v3ss0n have you got a solution to restore the Hosts list?
Only way is to go in and fix using SQL.
OK I managed to enable the user by: update user set is_deleted = 0 where is_deleted = 1; in mysql db
So the issue depend on the avatar icon on the host list?
The one with red spot is the undeleted user now only disabled.
@jc21 I whant to delete a secondary administrator user, but there are some proxy-host owned by this one. How could I change the owner than?
I was able to reset the user by:
- entering database
- using db
-
UPDATE user SET is_deleted=1;
- wait for restart (or manually restart)
-
UPDATE user SET is_deleted=0;
- wait for restart (or manually restart)
- log in
Upon logging in the deleted user is back along with their hosts.
There is probably a better way.
Thats shouldn't be the way , its a critical bug. We need a fix.
I was able to reset the user by:
1. entering database 2. using db 3. `UPDATE user SET is_deleted=1;` 4. wait for restart (or manually restart) 5. `UPDATE user SET is_deleted=0;` 6. wait for restart (or manually restart) 7. log in
Upon logging in the deleted user is back along with their hosts.
There is probably a better way.
That is dangerous, because it will restore the admin user with the default username and password!! ([email protected]/changeme)
Just encountered this very unfortunate issue. Was able to recover by assigning the affected entries to a different owner.
This is also done directly in the database. In my case I was using SQLite.
- First open a container shell. (use
docker ps
to find your container ID, if necessary)
docker exec -it <container-name-or-id> bash
- Install SQLite. (while inside the container)
apt update
apt install sqlite3
- Enter the database
sqlite3 /data/database.sqlite
- Find the ID of the user to which you want to reassign the affected entries. Optionally, also the ID of the removed user.
SELECT id, name FROM user;
1|etfz
2|Ghost
- Reassign the entries using the user IDs from the output of the previous query. You can either reassign everything to you, (first line in the example below) or only the entries owned by the removed user. (second line, useful if you still have other active users)
UPDATE proxy_host SET owner_user_id = 1;
UPDATE certificate SET owner_user_id = 1 where owner_user_id = 2;
List all tables using .tables
to find any other tables you may need to edit.
Taken from here: https://forums.unraid.net/topic/76460-support-djoss-nginx-proxy-manager/page/52/#comment-969943
Steps 1 through 3 can probably be done outside of the container, too, since the database should be bind mounted outside of the container.
Still happening. i followed @etfz steps and fixed the problem, but of course the bug can happen again.
Experiencing the same on latest version (v2.10.2 © 2022 ) applied the above fix and all is well. I do not know what started all this, I was updating some containers beforehand and then all of a sudden error!
Experiencing the same on latest version (v2.10.2 © 2022 ) applied the above fix and all is well. I do not know what started all this, I was updating some containers beforehand and then all of a sudden error!
yes, I had a problem today too, looking forward to a quick fix
Any update on this?
Consider moving to traefik . This is such a deal breaker bug that dev choose to ignore ( along with severe CVEs).
I was able to reset the user by:
- entering database
- using db
UPDATE user SET is_deleted=1;
- wait for restart (or manually restart)
UPDATE user SET is_deleted=0;
- wait for restart (or manually restart)
- log in
Upon logging in the deleted user is back along with their hosts.
There is probably a better way.
This worked for me!
Same issue here...
Consider moving to traefik . This is such a deal breaker bug that dev choose to ignore ( along with severe CVEs).
Can you elaborate on the CVE's?