From a985e496a887a591bd46954a9fa225c5311f3bc1 Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Mon, 16 Mar 2020 03:35:43 +1100 Subject: [PATCH] Adjusted regex --- server/simpleQL/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/simpleQL/index.js b/server/simpleQL/index.js index ada206d..ed7f68b 100644 --- a/server/simpleQL/index.js +++ b/server/simpleQL/index.js @@ -141,7 +141,7 @@ const parseQuery = (handler, tokens, pos, typeGraph) => { //utils const checkAlphaNumeric = (str) => { - if (!/^[a-z0-9]+$/i.test(str)) { + if (!/^[_a-z][_a-z0-9]*$/i.test(str)) { throw 'Unexpected string ' + str; } };