mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
Add a warning log when /%23/ characters are detected.
This commit is contained in:
parent
e21da43fd6
commit
cc50a7eec5
|
@ -240,6 +240,9 @@ func VerifyGet(ctx *middlewares.AutheliaCtx) {
|
||||||
rd := string(ctx.QueryArgs().Peek("rd"))
|
rd := string(ctx.QueryArgs().Peek("rd"))
|
||||||
if rd != "" {
|
if rd != "" {
|
||||||
redirectionURL := fmt.Sprintf("%s?rd=%s", rd, targetURL.String())
|
redirectionURL := fmt.Sprintf("%s?rd=%s", rd, targetURL.String())
|
||||||
|
if strings.Contains(redirectionURL, "/%23/") {
|
||||||
|
ctx.Logger.Warn("Characters /%23/ have been detected in redirection URL. This is not needed anymore, please strip it")
|
||||||
|
}
|
||||||
ctx.Redirect(redirectionURL, 302)
|
ctx.Redirect(redirectionURL, 302)
|
||||||
ctx.SetBodyString(fmt.Sprintf("Found. Redirecting to %s", redirectionURL))
|
ctx.SetBodyString(fmt.Sprintf("Found. Redirecting to %s", redirectionURL))
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user