mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-02-05 00:29:40 +03:00
Wrong domain URL in general settings break the admin panel #1262
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mh4ckt3mh4ckt1c4s on GitHub (Apr 30, 2022).
Subject of the issue
When using a wrong value in the URL Domain parameter of the General settings of the admin panel, saving this parameter break the admin panel. The CSS and images are not loaded anymore, and the parameters can't be changed (saving is resulting to an unknown error). Also, you will never be able to log in the admin panel again once you logged out after this bug.
Deployment environment
Vaultwarden version: v1.24.0
Web-vault version: v2.25.1
Running within Docker: true (Base: Debian)
Clients used: Web client
MySQL/MariaDB or PostgreSQL version: SQLite 3.35.4
Steps to reproduce
sudo docker run vaultwarden/server -e ADMIN_TOKEN=1234http://mydomain/com)Expected behaviour
The invalid URL is signaled and the parameters are not saved. Also, the page is not breaking.
Actual behaviour
The parameter is saved, effectively breaking the admin panel as described before.
Troubleshooting data
It seems that it is the / character that is breaking the panel. However, it should be investigated if other characters / patterns can also make the panel break.
@BlackDex commented on GitHub (Apr 30, 2022):
That is expected behavior since we support running Vaultwarden under a sub-path also instead of only a sub-domain.
The
DOMAINvariable is used to ensure all the links are pointing to the correct endpoint.Not having the correct
DOMAINvariable set could leads to issues with attachments, sends, but also the admin as you have experienced.You should still be able to access the admin interface though, although no styling is shown, the javascript part still works and you should be able to fix this by searching for
DOMAINand change it back to what it was. That should fix it, or you need to fix it manually by editing theconfig.jsonfile within your data folder.We can't go and try to detect a
/in there, since we do support that. And we can't really detect if you make a mistake or not.