#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:
Dave Reed
2010-12-10 14:20:08 -08:00
parent 919a57c1bf
commit 629a48958f
11 changed files with 59 additions and 98 deletions

View File

@@ -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 {