Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d20f544

Browse filesBrowse files
Merge branch '3.4' into 4.3
* 3.4: [HttpFoundation] Allow redirecting to URLs that contain a semicolon
2 parents 3b237ce + 9e7c254 commit d20f544
Copy full SHA for d20f544

File tree

2 files changed

+2
-5
lines changed
Filter options

2 files changed

+2
-5
lines changed

‎src/Symfony/Component/HttpFoundation/RedirectResponse.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/RedirectResponse.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function setTargetUrl($url)
9393
<html>
9494
<head>
9595
<meta charset="UTF-8" />
96-
<meta http-equiv="refresh" content="0;url=%1$s" />
96+
<meta http-equiv="refresh" content="0;url=\'%1$s\'" />
9797
9898
<title>Redirecting to %1$s</title>
9999
</head>

‎src/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ public function testGenerateMetaRedirect()
2020
{
2121
$response = new RedirectResponse('foo.bar');
2222

23-
$this->assertEquals(1, preg_match(
24-
'#<meta http-equiv="refresh" content="\d+;url=foo\.bar" />#',
25-
preg_replace(['/\s+/', '/\'/'], [' ', '"'], $response->getContent())
26-
));
23+
$this->assertRegExp('#<meta http-equiv="refresh" content="\d+;url=\'foo\.bar\'" />#', preg_replace('/\s+/', ' ', $response->getContent()));
2724
}
2825

2926
public function testRedirectResponseConstructorNullUrl()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.