mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-25 17:25:57 +03:00
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#2806
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?
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/812
Author: @swedishborgie
Created: 1/14/2020
Status: ✅ Merged
Merged: 1/16/2020
Merged by: @dani-garcia
Base:
master← Head:postgresql📝 Commits (2)
76743aeFixes #635 - Unique constraint violation when using U2F tokens on PostgreSQLe196ba6Switch error handling to ? operator instead of explicit handling.📊 Changes
1 file changed (+7 additions, -0 deletions)
View changed files
📝
src/db/models/two_factor.rs(+7 -0)📄 Description
Because of differences in how .on_conflict() works compared to .replace_into() the PostgreSQL backend wasn't correctly ensuring the unique constraint on user_uuid and atype wasn't getting violated.
This change simply issues a DELETE on the unique constraint prior to the insert to ensure uniqueness. PostgreSQL does not support multiple constraints in ON CONFLICT clauses.
Please let me know if you'd like to see any changes.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.