From 2c04b5a98249ee27aaad7f768b68673e14ed8281 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Tue, 8 Aug 2023 12:30:42 -0400 Subject: [PATCH] Add ability to distinguish trapped entry point in `json-prune` --- assets/resources/scriptlets.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/assets/resources/scriptlets.js b/assets/resources/scriptlets.js index 55dabc892..814c7e7ab 100644 --- a/assets/resources/scriptlets.js +++ b/assets/resources/scriptlets.js @@ -1216,7 +1216,10 @@ function jsonPrune( const extraArgs = safe.getExtraArgs(Array.from(arguments), 3); const logLevel = shouldLog(extraArgs); const fetchPropNeedles = parsePropertiesToMatch(extraArgs.fetchPropsToMatch, 'url'); - if ( fetchPropNeedles.size === 0 ) { + if ( + fetchPropNeedles.size === 0 || + matchObjectProperties(fetchPropNeedles, { url: 'undefined' }) + ) { JSON.parse = new Proxy(JSON.parse, { apply: function(target, thisArg, args) { return objectPrune(