Fix iOS sync by converting field types to int #882

Closed
opened 2026-04-06 00:21:46 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @BlackDex on 10/13/2024

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

*Originally created by @BlackDex on 10/13/2024* 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
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/vaultwarden#882