mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-26 01:35:54 +03:00
[GH-ISSUE #777] Web devices have longer device UUID that does not fit to MySQL/PostgreSQL devices.uuid field #536
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#536
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 @flamechair on GitHub (Dec 22, 2019).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/777
Subject of the issue
Using sqlite the column
devices.uuidis of length 40, but the column created in the mysql migration is only 36 characters longYour environment
devices.uuidanddevices.user_uuidto bechar(40)solve this issueSteps to reproduce
Expected behaviour
migration goes smoothly
Actual behaviour
ERROR 1406 (22001) at line 14: Data too long for column 'uuid' at row 1Relevant logs
web-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeeeis 40 characters long, but the column in the mysql table is created aschar(36)@mprasil commented on GitHub (Dec 23, 2019):
That's interesting, it seems like devices with name
webhave longer UUID for some reason. (the extraweb-prefix) Makes me wonder why/if these clients actually work with MySQL backend. (SQLite has no length limit, so we probably haven't noticed that issue there) I'd assume it would also affect ProtgreSQL users.I think this is an actual bug now and it must be problematic even outside of migration issues.
@mprasil commented on GitHub (Dec 23, 2019):
Sample SQL data as fetched from sqlite:
@dani-garcia commented on GitHub (Dec 23, 2019):
Interesting, I just checked my database and none of my devices do that, though I remember a long time ago I manually added that web- prefix for a reason I can't remember now. Is is possible that those are some very old devices?
@flamechair commented on GitHub (Dec 23, 2019):
They most definitely are old devices, I've been using Bitwarden for quite some time now
-------- Original Message --------
On Dec 23, 2019, 9:44 AM, Daniel García wrote:
@mprasil commented on GitHub (Dec 24, 2019):
Would it make sense to add migrations SQL to drop any
web-*devices?@flamechair commented on GitHub (Dec 24, 2019):
If the UUIDs aren't used anymore, then yes. Otherwise expanding the column to 40 characters would also be an option.
@mprasil commented on GitHub (Dec 27, 2019):
@dani-garcia can you point me to a piece of code where the
web-prefix was added? I can't find it and github search certainly doesn't help.. Just to make sure it's already removed.@dani-garcia commented on GitHub (May 13, 2020):
Closed due to inactivity.