mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Cast the header value to string as PHPUnit can't handle it being NULL.
This commit is contained in:
parent
82da8a0718
commit
2c0257e9b9
@ -142,7 +142,7 @@ class SecurityTest extends FunctionalTest {
|
||||
|
||||
// Test external redirect
|
||||
$response = $this->doTestLoginForm('noexpiry@silverstripe.com', '1nitialPassword', 'http://myspoofedhost.com');
|
||||
$this->assertNotRegExp('/^' . preg_quote('http://myspoofedhost.com', '/') . '/', $response->getHeader('Location'),
|
||||
$this->assertNotRegExp('/^' . preg_quote('http://myspoofedhost.com', '/') . '/', (string)$response->getHeader('Location'),
|
||||
"Redirection to external links in login form BackURL gets prevented as a measure against spoofing attacks"
|
||||
);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user