mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
[fix] PCRE choice if no %. in url regex
This commit is contained in:
parent
b90153a5ca
commit
c3a9380361
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue