From 2f099c8573fec4234c6bee5d4e1a82b283e55e39 Mon Sep 17 00:00:00 2001 From: Steven King Jr Date: Thu, 14 Feb 2019 13:08:49 -0700 Subject: [PATCH] Fix regex state causing subsequent runs of Tag.extractSignature to fail --- lib/tag.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tag.js b/lib/tag.js index a1183bc85..4c21f45aa 100644 --- a/lib/tag.js +++ b/lib/tag.js @@ -123,7 +123,7 @@ Tag.prototype.extractSignature = function(signatureType = "gpgsig") { const odbData = odbObject.toString(); for (const regex of signatureRegexes) { - const matchResult = regex.exec(odbData); + const matchResult = odbData.match(regex); if (matchResult !== null) { return matchResult[0];