Don't double encode tgt
This commit is contained in:
parent
8c92bce3d9
commit
5ff4726f43
|
@ -19,9 +19,8 @@ public class RedirectController : Controller {
|
||||||
return BadRequest("Bad request.");
|
return BadRequest("Bad request.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// tgt is urlencoded twice because authelia decodes it by one layer
|
|
||||||
var targetUrl =
|
var targetUrl =
|
||||||
$"https://{Vars.AuthProxySubdomain}.{dstDomain}/api/cookieproxy_stage_one?tgt={HttpUtility.UrlEncode(HttpUtility.UrlEncode(tgt))}";
|
$"https://{Vars.AuthProxySubdomain}.{dstDomain}/api/cookieproxy_stage_one?tgt={HttpUtility.UrlEncode(tgt)}";
|
||||||
Response.Redirect(targetUrl);
|
Response.Redirect(targetUrl);
|
||||||
return Content($"Redirecting... <a href=\"{targetUrl}\">Click here if you are not redirected automatically</a>", "text/html");
|
return Content($"Redirecting... <a href=\"{targetUrl}\">Click here if you are not redirected automatically</a>", "text/html");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue