[PR #5081] [MERGED] Fix iOS sync by converting field types to int #36644

Closed
opened 2026-07-13 21:15:42 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/5081
Author: @BlackDex
Created: 10/13/2024
Status: Merged
Merged: 10/13/2024
Merged by: @dani-garcia

Base: mainHead: fix-ios-sync-issue


📝 Commits (1)

  • 3604339 Fix iOS sync by converting field types to int

📊 Changes

1 file changed (+22 additions, -2 deletions)

View changed files

📝 src/db/models/cipher.rs (+22 -2)

📄 Description

It seems the iOS clients are not able to handle the type key within the fields array when they are of the type string.
All other clients seem to handle this just fine though.

This PR fixes this by validating it is a number, if this is not the case, try to convert the string to a number, or return the default of 1.
1 is used as this is the type hidden and should prevent accidental data disclosure.

Fixes #5069

Possibly Fixes #5016
Possibly Fixes #5002


🔄 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/5081 **Author:** [@BlackDex](https://github.com/BlackDex) **Created:** 10/13/2024 **Status:** ✅ Merged **Merged:** 10/13/2024 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `main` ← **Head:** `fix-ios-sync-issue` --- ### 📝 Commits (1) - [`3604339`](https://github.com/dani-garcia/vaultwarden/commit/3604339106b0d9f4b66c0ec7177ceb6d6cdfc812) Fix iOS sync by converting field types to int ### 📊 Changes **1 file changed** (+22 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/db/models/cipher.rs` (+22 -2) </details> ### 📄 Description It seems the iOS clients are not able to handle the `type` key within the `fields` array when they are of the type string. All other clients seem to handle this just fine though. This PR fixes this by validating it is a number, if this is not the case, try to convert the string to a number, or return the default of `1`. `1` is used as this is the type `hidden` and should prevent accidental data disclosure. Fixes #5069 Possibly Fixes #5016 Possibly Fixes #5002 --- <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-07-13 21:15:42 -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#36644