mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX Checking for Director::is_site_url() before redirecting in Controller->redirectBack() and MemberLoginForm (Merged from r73252)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.2@73276 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
a4e1df6f7a
commit
2ab2acc44f
@ -100,7 +100,12 @@ class MemberLoginForm extends LoginForm {
|
|||||||
Session::clear('SessionForms.MemberLoginForm.Email');
|
Session::clear('SessionForms.MemberLoginForm.Email');
|
||||||
Session::clear('SessionForms.MemberLoginForm.Remember');
|
Session::clear('SessionForms.MemberLoginForm.Remember');
|
||||||
|
|
||||||
if(isset($_REQUEST['BackURL']) && $backURL = $_REQUEST['BackURL']) {
|
if(
|
||||||
|
isset($_REQUEST['BackURL'])
|
||||||
|
&& $_REQUEST['BackURL']
|
||||||
|
// absolute redirection URLs may cause spoofing
|
||||||
|
&& Director::is_site_url($_REQUEST['BackURL'])
|
||||||
|
) {
|
||||||
Session::clear("BackURL");
|
Session::clear("BackURL");
|
||||||
Director::redirect($backURL);
|
Director::redirect($backURL);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user