From c3a93803619e5c63caca1d2b81f87e722b71211d Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Thu, 13 Dec 2018 23:23:10 +0100 Subject: [PATCH] [fix] PCRE choice if no %. in url regex --- access.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/access.lua b/access.lua index b2e510b..62e2647 100644 --- a/access.lua +++ b/access.lua @@ -191,7 +191,11 @@ end -- A match function to support PCRE and lua pattern -- lua pattern will be deprecated in YunoHost function match(s, regex) - if rex.match(s, regex) or string.match(s,regex) then + if not string.find(regex, '%%%.') then + if rex.match(s, regex) then + return true + end + elseif string.match(s,regex) then return true end return false