mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
#17021 Redirects in actions using returnUrl need to only redirect to the returnUrl if Url.IsLocalUrl
We did this in a lot of places. Adds a controller extension method that makes this easier. --HG-- branch : dev
This commit is contained in:
@@ -71,19 +71,13 @@ namespace Orchard.Users.Controllers {
|
||||
|
||||
_authenticationService.SignIn(user, false);
|
||||
|
||||
if (string.IsNullOrEmpty(returnUrl))
|
||||
return new RedirectResult("~/");
|
||||
|
||||
return new RedirectResult(returnUrl);
|
||||
return this.RedirectLocal(returnUrl);
|
||||
}
|
||||
|
||||
public ActionResult LogOff(string returnUrl) {
|
||||
_authenticationService.SignOut();
|
||||
|
||||
if (string.IsNullOrEmpty(returnUrl))
|
||||
return new RedirectResult("~/");
|
||||
|
||||
return new RedirectResult(returnUrl);
|
||||
return this.RedirectLocal(returnUrl);
|
||||
}
|
||||
|
||||
int MinPasswordLength {
|
||||
|
Reference in New Issue
Block a user