From 9511f1e1305f32fb2acc37cdd6d49202ea1da27c Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 2 Mar 2019 13:19:18 -0700 Subject: [PATCH] v1.1.8: bugfix increase incorrect loop limit for eager parsing --- asn1-parser.js | 7 +++++-- package.json | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/asn1-parser.js b/asn1-parser.js index 3707863..82f7cd0 100644 --- a/asn1-parser.js +++ b/asn1-parser.js @@ -17,9 +17,12 @@ var PEM = exports.PEM; // Parser // -ASN1.ELOOPN = 20; // I've seen 9 max in https certificates +// Although I've only seen 9 max in https certificates themselves, +// but each domain list could have up to 100 +ASN1.ELOOPN = 102; ASN1.ELOOP = "uASN1.js Error: iterated over " + ASN1.ELOOPN + "+ elements (probably a malformed file)"; -ASN1.EDEEPN = 60; // I've seen 29 deep in https certificates +// I've seen https certificates go 29 deep +ASN1.EDEEPN = 60; ASN1.EDEEP = "uASN1.js Error: element nested " + ASN1.EDEEPN + "+ layers deep (probably a malformed file)"; // Container Types are Sequence 0x30, Container Array? (0xA0, 0xA1) // Value Types are Boolean 0x01, Integer 0x02, Null 0x05, Object ID 0x06, String 0x0C, 0x16, 0x13, 0x1e Value Array? (0x82) diff --git a/package.json b/package.json index 7e9f8e0..c1feaf0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "asn1-parser", - "version": "1.1.7", + "version": "1.1.8", "description": "An ASN.1 parser in less than 100 lines of Vanilla JavaScript, part of the Bluecrypt suite.", "homepage": "https://git.coolaj86.com/coolaj86/asn1-parser.js", "main": "asn1-parser.js",