mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-26 09:46:00 +03:00
[GH-ISSUE #2419] Lack of validation on name of the users #1257
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#1257
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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 @pavel1337 on GitHub (Apr 14, 2022).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/2419
Originally assigned to: @BlackDex on GitHub.
Subject of the issue
Lack of validation on name of the users
Deployment environment
vaultwarden version: 1.24.0
Install method: Docker (Base: Debian)
Clients used: web client
MySQL/MariaDB or PostgreSQL version: MySQL 8.0.23 RDS
Other relevant details:
Steps to reproduce
pwgen 100000 1)Expected behaviour
Actual behaviour
Troubleshooting data
The command I used to create a long username:
pwgen 100000 1The screenshot of the users table; I guess it should be something like

varchar(x)The screenshot of the organization with me in it:

The screenshot of me trying create a send and developer tools

@BlackDex commented on GitHub (Jun 4, 2022):
Looks like Bitwarden it self uses a max of 50 characters. It will be a bit difficult now to switch that for Vaultwarden to a lower size if people were already using a larger amount of characters for the names.
Though limiting it a specific amount is not a bad idea, i need to see what a good amount is.
@dani-garcia commented on GitHub (Jun 4, 2022):
We could just limit it in the save function, if we don't want to create a new migration for this change
@BlackDex commented on GitHub (Jun 8, 2022):
I think it should be enough to have this only at the register function, what do you think @dani-garcia ?
That would at least prevent new users from using a large Name, but will not force current users to change it when they update there info.
btw: i have it working already locally.
@dani-garcia commented on GitHub (Jun 8, 2022):
Right, but a user could also change their name from the web vault after the account was created, I know realistically no one is going to put a long enough name to break the web vault, but we should cover all bases if possible.