mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Fixed double pragma after referer redirection on forms with Form->httpSubmission() (fixes #5509, thanks ktauber) (from r103936)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112325 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
d25916b810
commit
d2c096119c
@ -280,7 +280,11 @@ class Form extends RequestHandler {
|
||||
} else {
|
||||
if($this->getRedirectToFormOnValidationError()) {
|
||||
if($pageURL = $request->getHeader('Referer')) {
|
||||
return Director::redirect($pageURL . '#' . $this->FormName());
|
||||
if(Director::is_site_url($pageURL)) {
|
||||
// Remove existing pragmas
|
||||
$pageURL = preg_replace('/(#.*)/', '', $pageURL);
|
||||
return Director::redirect($pageURL . '#' . $this->FormName());
|
||||
}
|
||||
}
|
||||
}
|
||||
return Director::redirectBack();
|
||||
|
Loading…
Reference in New Issue
Block a user