Skip to content

Commit

Permalink
Remove ASAR 240 bytes of JSON payload length limitation (#453)
Browse files Browse the repository at this point in the history
  • Loading branch information
Borewit committed May 28, 2021
1 parent 3df0ed1 commit 07101ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core.js
Expand Up @@ -1248,7 +1248,7 @@ async function _fromTokenizer(tokenizer) {

if (check([0x04, 0x00, 0x00, 0x00]) && buffer.length >= 16) { // Rough & quick check Pickle/ASAR
const jsonSize = buffer.readUInt32LE(12);
if (jsonSize > 12 && jsonSize < 240 && buffer.length >= jsonSize + 16) {
if (jsonSize > 12 && buffer.length >= jsonSize + 16) {
try {
const header = buffer.slice(16, jsonSize + 16).toString();
const json = JSON.parse(header);
Expand Down

0 comments on commit 07101ac

Please sign in to comment.