From 00f9d0449cc6c4fd6d099ac053224139c1c5197c Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Mon, 18 Oct 2021 01:51:37 +1100 Subject: [PATCH] fix(regex): Prevent converting JSON in queries into placeholders - When a JSON string is entered as part of a query, rather than a parameter, it is assumed to define a named placeholder - this will check for quotations and ignore it --- patches/named-placeholders+1.1.2.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/named-placeholders+1.1.2.patch b/patches/named-placeholders+1.1.2.patch index bcea499..69b16f4 100644 --- a/patches/named-placeholders+1.1.2.patch +++ b/patches/named-placeholders+1.1.2.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/named-placeholders/index.js b/node_modules/named-placeholders/index.js -index 527d723..1ac61d5 100644 +index 527d723..f63ce28 100644 --- a/node_modules/named-placeholders/index.js +++ b/node_modules/named-placeholders/index.js @@ -3,7 +3,7 @@ @@ -7,7 +7,7 @@ index 527d723..1ac61d5 100644 // License: https://github.com/mscdex/node-mariasql/blob/master/LICENSE -const RE_PARAM = /(?:\?)|(?::(\d+|(?:[a-zA-Z][a-zA-Z0-9_]*)))/g, -+const RE_PARAM = /(?:\?)|(?:[:@](\d+|(?:[a-zA-Z][a-zA-Z0-9_]*)))/g, ++const RE_PARAM = /(?:\?)|(?:(?