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.
🔄 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>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 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:
main← Head:fix-ios-sync-issue📝 Commits (1)
3604339Fix 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
typekey within thefieldsarray 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.1is used as this is the typehiddenand 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.