mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-05-24 09:03:15 -05:00
[PR #3087] [MERGED] Fix failing large note imports #22743
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?
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/3087
Author: @BlackDex
Created: 1/1/2023
Status: ✅ Merged
Merged: 1/9/2023
Merged by: @dani-garcia
Base:
main← Head:issue-3048📝 Commits (1)
6be26f0Fix failing large note imports📊 Changes
4 files changed (+42 additions, -3 deletions)
View changed files
📝
src/api/core/ciphers.rs(+7 -1)📝
src/api/core/mod.rs(+1 -1)📝
src/api/core/organizations.rs(+6 -0)📝
src/db/models/cipher.rs(+28 -1)📄 Description
When importing to Vaultwarden (or Bitwarden) notes larger then 10_000 encrypted characters are invalid. This because it for one isn't compatible with Bitwarden. And some clients tend to break on very large notes.
We already added a check for this limit when adding a single cipher, but this caused issues during import, and could cause a partial imported vault. Bitwarden does some validations before actually running it through the import process and generates a special error message which helps the user indicate which items are invalid during the import.
This PR adds that validation check and returns the same kind of error. Fixes #3048
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.