fix(plist): report omitted __proto__ entries in signatures and Interface Builder
#885 decodes XML plists that contain a __proto__ key by omitting those entries, but signature entitlements and Interface Builder plists dropped the omission count. inspect_signature returned an entitlement set that looked complete, and archive_decode stayed complete. Both now report the omission: a signature limitation, and a partial archive_decode facet with reason dictionary_entries_omitted and a per-document limitation. The placeholder that stands in for __proto__ was reserved against the raw XML text, so an entity-encoded key such as __rea_prototype_key__ decoded to the placeholder and was omitted as if it were __proto__. The placeholder is now reserved against the decoded text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
faaee693d5
commit
6729ee7636
@@ -75,8 +75,11 @@ const decodeXmlText = (text: string): string =>
|
||||
export const parseXmlPropertyList = (
|
||||
text: string,
|
||||
): PropertyListWithoutPrototypeKeys => {
|
||||
// The decoded text holds every key the decoder can produce, including
|
||||
// entity-encoded spellings of the placeholder, so no source key aliases it.
|
||||
const decoded = decodeXmlText(text);
|
||||
let placeholder = "__rea_prototype_key__";
|
||||
while (text.includes(placeholder)) placeholder = `_${placeholder}`;
|
||||
while (decoded.includes(placeholder)) placeholder = `_${placeholder}`;
|
||||
const substituted = text.replace(
|
||||
KEY_TOKEN,
|
||||
(token, plain?: string, cdata?: string) =>
|
||||
|
||||
Reference in New Issue
Block a user