Fleny
Explore posts from servers[Nuxt Devtools] fail on string-serialized bigint
for reference from the erroring file:
function Jw(t) {
return uee.test(t)
}
var uee = /^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;
/// ....
// e.parse refers to tle, which seems to match destr safeDestr function
function nf(t, e) {
if (t === "")
return "";
var n = t.trim();
return n === "null" ? null : n === "true" || n !== "false" && (Jw(n) ? e.parse(n) : t)
}
/// ...
function nm(t, e={}) {
if (typeof t != "string")
return t;
const n = t.trim();
if (t[0] === '"' && t.endsWith('"') && !t.includes("\\"))
return n.slice(1, -1);
if (n.length <= 9) {
const r = n.toLowerCase();
if (r === "true")
return !0;
if (r === "false")
return !1;
if (r === "undefined")
return;
if (r === "null")
return null;
if (r === "nan")
return Number.NaN;
if (r === "infinity")
return Number.POSITIVE_INFINITY;
if (r === "-infinity")
return Number.NEGATIVE_INFINITY
}
if (!Xae.test(t)) {
if (e.strict)
throw new SyntaxError("[destr] Invalid JSON");
return t
}
try {
if (Yae.test(t) || Qae.test(t)) {
if (e.strict)
throw new Error("[destr] Possible prototype pollution");
return JSON.parse(t, Zae)
}
return JSON.parse(t)
} catch (r) {
if (e.strict)
throw r;
return t
}
}
function tle(t, e={}) {
return nm(t, {
...e,
strict: !0
})
}
function Jw(t) {
return uee.test(t)
}
var uee = /^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;
/// ....
// e.parse refers to tle, which seems to match destr safeDestr function
function nf(t, e) {
if (t === "")
return "";
var n = t.trim();
return n === "null" ? null : n === "true" || n !== "false" && (Jw(n) ? e.parse(n) : t)
}
/// ...
function nm(t, e={}) {
if (typeof t != "string")
return t;
const n = t.trim();
if (t[0] === '"' && t.endsWith('"') && !t.includes("\\"))
return n.slice(1, -1);
if (n.length <= 9) {
const r = n.toLowerCase();
if (r === "true")
return !0;
if (r === "false")
return !1;
if (r === "undefined")
return;
if (r === "null")
return null;
if (r === "nan")
return Number.NaN;
if (r === "infinity")
return Number.POSITIVE_INFINITY;
if (r === "-infinity")
return Number.NEGATIVE_INFINITY
}
if (!Xae.test(t)) {
if (e.strict)
throw new SyntaxError("[destr] Invalid JSON");
return t
}
try {
if (Yae.test(t) || Qae.test(t)) {
if (e.strict)
throw new Error("[destr] Possible prototype pollution");
return JSON.parse(t, Zae)
}
return JSON.parse(t)
} catch (r) {
if (e.strict)
throw r;
return t
}
}
function tle(t, e={}) {
return nm(t, {
...e,
strict: !0
})
}
2 replies