Skip to content

fix(plist): only read direct-child keys when parsing a dict - #295

Merged
harsha509 merged 1 commit into
mainfrom
fix/plist-nested-dict-keys
Aug 20, 2026
Merged

fix(plist): only read direct-child keys when parsing a dict#295
harsha509 merged 1 commit into
mainfrom
fix/plist-nested-dict-keys

Conversation

@harsha509

Copy link
Copy Markdown
Collaborator

parseDict used getElementsByTagName('key'), which is recursive. Keys from nested dicts were flattened into the parent object, and a nested key could overwrite a parent key of the same name.

Now walks direct children only and skips past each parsed value.

Affects every XML plist path: usbmux device lists, lockdown responses, pair records, provisioning profiles, configuration profiles.

Tests: 3 cases added for nested key isolation, same-name shadowing, and dicts inside arrays.

getElementsByTagName('key') is recursive, so keys from nested dicts leaked
into the parent object and a nested key could overwrite a parent key of the
same name. Walk direct children instead and skip past each parsed value.
@harsha509
harsha509 merged commit 7d8c5c3 into main Aug 20, 2026
9 checks passed
@harsha509
harsha509 deleted the fix/plist-nested-dict-keys branch August 20, 2026 16:13
github-actions Bot pushed a commit that referenced this pull request Aug 20, 2026
## [5.14.5](v5.14.4...v5.14.5) (2026-08-20)

### Bug Fixes

* **plist:** only read direct-child keys when parsing a dict ([#295](#295)) ([7d8c5c3](7d8c5c3))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 5.14.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants