mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
fix not only alphanumeric characters domain name
This commit is contained in:
parent
6e4c1facaf
commit
0e6369bb38
1 changed files with 1 additions and 1 deletions
|
@ -1070,7 +1070,7 @@ function redirect(url)
|
|||
if not string.starts(url, "/") and not string.starts(url, "http://") and not string.starts(url, "https://") then
|
||||
url = "https://"..url
|
||||
end
|
||||
local domain = url:match("^https?://([%w%.]*)/?")
|
||||
local domain = url:match("^https?://([^/]+)/?")
|
||||
if string.match(url, "(.*)\n") or (domain ~= nil and not is_in_table(conf["domains"], domain)) then
|
||||
logger.debug("Unauthorized redirection to "..url)
|
||||
flash("fail", t("redirection_error_invalid_url"))
|
||||
|
|
Loading…
Reference in a new issue