Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
Merge branch '2.1'
Browse files Browse the repository at this point in the history
* 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
fabpot committed Dec 11, 2012
2 parents 7c66d52 + 78e25f3 commit 94149fa
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
Expand Up @@ -58,7 +58,6 @@ public function onAuthenticationSuccess(Request $request, TokenInterface $token)
return $this->httpUtils->createRedirectResponse($request, $this->determineTargetUrl($request));
}


/**
* Get the provider key.
*
Expand Down
1 change: 1 addition & 0 deletions Http/Firewall/ContextListener.php
Expand Up @@ -75,6 +75,7 @@ public function handle(GetResponseEvent $event)

if (null === $session || null === $token = $session->get('_security_'.$this->contextKey)) {
$this->context->setToken(null);

return;
}

Expand Down
2 changes: 1 addition & 1 deletion Http/HttpUtils.php
Expand Up @@ -106,7 +106,7 @@ public function checkRequestPath(Request $request, $path)
}
}

return $path === $request->getPathInfo();
return $path === rawurldecode($request->getPathInfo());
}

/**
Expand Down
5 changes: 5 additions & 0 deletions Tests/Http/HttpUtilsTest.php
Expand Up @@ -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
Expand Down

0 comments on commit 94149fa

Please sign in to comment.