Browse files

Merge branch '2.1'

* 2.1:
  fixed CS
  fixed CS
  [Security] fixed path info encoding (closes #6040, closes #5695)
  [HttpFoundation] added some tests for the previous merge and removed dead code (closes #6037)
  Improved Cache-Control header when no-cache is sent
  removed unneeded comment
  Fix to allow null values in labels array
  fix date in changelog
  removed the Travis icon (as this is not stable enough -- many false positive, closes #6186)
  Revert "merged branch gajdaw/finder_splfileinfo_fpassthu (PR #4751)" (closes #6224)
  Fixed a typo
  Fixed: HeaderBag::parseCacheControl() not parsing quoted zero correctly
  [Form] Fix const inside an anonymous function
  [Config] Loader::import must return imported data
  [DoctrineBridge] Fixed caching in DoctrineType when "choices" or "preferred_choices" is passed
  [Form] Fixed the default value of "format" in DateType to DateType::DEFAULT_FORMAT if "widget" is not "single_text"
  [HttpFoundation] fixed a small regression

Conflicts:
	src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php
  • Loading branch information...
2 parents 7c66d52 + 78e25f3 commit 94149fa4eadb815a898537129c7ac2a512fd721e @fabpot fabpot committed Dec 11, 2012
View
1 Http/Authentication/DefaultAuthenticationSuccessHandler.php
@@ -58,7 +58,6 @@ public function onAuthenticationSuccess(Request $request, TokenInterface $token)
return $this->httpUtils->createRedirectResponse($request, $this->determineTargetUrl($request));
}
-
/**
* Get the provider key.
*
View
1 Http/Firewall/ContextListener.php
@@ -75,6 +75,7 @@ public function handle(GetResponseEvent $event)
if (null === $session || null === $token = $session->get('_security_'.$this->contextKey)) {
$this->context->setToken(null);
+
return;
}
View
2 Http/HttpUtils.php
@@ -106,7 +106,7 @@ public function checkRequestPath(Request $request, $path)
}
}
- return $path === $request->getPathInfo();
+ return $path === rawurldecode($request->getPathInfo());
}
/**
View
5 Tests/Http/HttpUtilsTest.php
@@ -97,6 +97,11 @@ public function testCheckRequestPath()
$this->assertTrue($utils->checkRequestPath($this->getRequest(), '/'));
$this->assertFalse($utils->checkRequestPath($this->getRequest(), '/foo'));
+ $this->assertTrue($utils->checkRequestPath($this->getRequest('/foo%20bar'), '/foo bar'));
+ // Plus must not decoded to space
+ $this->assertTrue($utils->checkRequestPath($this->getRequest('/foo+bar'), '/foo+bar'));
+ // Checking unicode
+ $this->assertTrue($utils->checkRequestPath($this->getRequest(urlencode('/вход')), '/вход'));
$urlMatcher = $this->getMock('Symfony\Component\Routing\Matcher\UrlMatcherInterface');
$urlMatcher

0 comments on commit 94149fa

Please sign in to comment.