mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
[fix] redirect with uri
This commit is contained in:
parent
8af2d30c51
commit
2f5d53540f
1 changed files with 1 additions and 1 deletions
|
@ -1061,7 +1061,7 @@ function redirect(url)
|
||||||
-- And if `uri_args.r` contains line break, someone is probably trying to
|
-- And if `uri_args.r` contains line break, someone is probably trying to
|
||||||
-- pass some additional headers
|
-- pass some additional headers
|
||||||
local domain = url:match("^https?://([%w%.]*)/?")
|
local domain = url:match("^https?://([%w%.]*)/?")
|
||||||
if string.match(url, "(.*)\n") or not is_in_table(conf["domains"], domain) then
|
if string.match(url, "(.*)\n") or (domain ~= nil and not is_in_table(conf["domains"], domain)) then
|
||||||
logger.debug("Unauthorized redirection to "..url)
|
logger.debug("Unauthorized redirection to "..url)
|
||||||
flash("fail", t("redirection_error_invalid_url"))
|
flash("fail", t("redirection_error_invalid_url"))
|
||||||
url = conf.portal_url
|
url = conf.portal_url
|
||||||
|
|
Loading…
Add table
Reference in a new issue