[PR #5200] [MERGED] Fix Org Import duplicate collections #21775

Closed
opened 2026-04-30 08:11:57 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/5200
Author: @BlackDex
Created: 11/16/2024
Status: Merged
Merged: 11/17/2024
Merged by: @dani-garcia

Base: mainHead: fix-org-coll-import


📝 Commits (1)

  • 787a645 Fix Org Import duplicate collections

📊 Changes

3 files changed (+27 additions, -27 deletions)

View changed files

📝 src/api/core/ciphers.rs (+5 -5)
📝 src/api/core/organizations.rs (+21 -18)
📝 src/api/core/two_factor/duo_oidc.rs (+1 -4)

📄 Description

This fixes an issue with collections be duplicated same as was an issue with folders. Also made some optimizations by using HashSet where possible and define the Vec/Hash capacity. And instead of passing objects only use the UUID which was the only value we needed.

Also found an issue with importing a personal export via the Org import where folders are used. Since Org's do not use folder we needed to clear those out, same as Bitwarden does.

Fixes #5193


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/dani-garcia/vaultwarden/pull/5200 **Author:** [@BlackDex](https://github.com/BlackDex) **Created:** 11/16/2024 **Status:** ✅ Merged **Merged:** 11/17/2024 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `main` ← **Head:** `fix-org-coll-import` --- ### 📝 Commits (1) - [`787a645`](https://github.com/dani-garcia/vaultwarden/commit/787a645575a0ec8c00a637bbc8872ea54156ee23) Fix Org Import duplicate collections ### 📊 Changes **3 files changed** (+27 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `src/api/core/ciphers.rs` (+5 -5) 📝 `src/api/core/organizations.rs` (+21 -18) 📝 `src/api/core/two_factor/duo_oidc.rs` (+1 -4) </details> ### 📄 Description This fixes an issue with collections be duplicated same as was an issue with folders. Also made some optimizations by using HashSet where possible and define the Vec/Hash capacity. And instead of passing objects only use the UUID which was the only value we needed. Also found an issue with importing a personal export via the Org import where folders are used. Since Org's do not use folder we needed to clear those out, same as Bitwarden does. Fixes #5193 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-30 08:11:57 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#21775