mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
[fix] Escape dash in domain before matching.
This commit is contained in:
parent
e7b39d4d29
commit
0823062e30
1 changed files with 2 additions and 1 deletions
|
@ -93,7 +93,8 @@ then
|
|||
|
||||
-- In case the `back_url` is not on the same domain than the
|
||||
-- current one, create a redirection with a CDA key
|
||||
if not string.match(back_url, "^http[s]?://"..ngx.var.host.."/")
|
||||
local ngx_host_escaped = ngx.var.host:gsub("-", "%%-") -- escape dash for pattern matching
|
||||
if not string.match(back_url, "^http[s]?://"..ngx_host_escaped.."/")
|
||||
and not string.match(back_url, ".*"..conf.login_arg.."=%d+$") then
|
||||
local cda_key = hlp.set_cda_key()
|
||||
if string.match(back_url, ".*?.*") then
|
||||
|
|
Loading…
Add table
Reference in a new issue