summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2015-01-25 05:42:01 +0100
committerFabien Potencier <fabien.potencier@gmail.com>2015-01-25 05:42:01 +0100
commit868fb240c232522937df01ac2e2e2516c13000c7 (patch)
tree8a718ac08aff7a9a161f0a3b1777706a84dfbf5e
parentb558f6f9a456c2aae4d9f6260122fa348d9df1cd (diff)
parent9c940b6c6a370250a31b00664c088bb14d9e696f (diff)
downloadsymfony-security-868fb240c232522937df01ac2e2e2516c13000c7.zip
symfony-security-868fb240c232522937df01ac2e2e2516c13000c7.tar.gz
symfony-security-868fb240c232522937df01ac2e2e2516c13000c7.tar.bz2
Merge branch '2.7'
* 2.7: fixed tests [OptionsResolver] replaced some exception messages Added i18n support to ConfirmationQuestion [HttpKernel] [WebProfilerBundle] added HTTP status to profiler search result [Form] fixed form tests when using 2.7 deps [2.3] [HttpFoundation] [MimeTypeGuesser] [Routing] merge instead of replace class and method scheme/method annotations [TwigBridge] Fix bootstrap rendering when user explicitly use form_label Removed dead code and various cleaning Removed dead code and various cleaning Fixed HtmlDumper with long string Removed dead code and various cleaning [FrameworkBundle][xsd] added missing logging attribute. [Console] Make it clear that the second argument is not about command options. Added the '-' character for spaceless on tag start and end to be consistent for block, if, set and for nodes [Yaml] fixed parse shortcut Key after unindented collection. [Console] fixed #10531 Make the container considered non-fresh if the environment parameters are changed Conflicts: src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig src/Symfony/Component/HttpKernel/CHANGELOG.md src/Symfony/Component/Process/Process.php
-rw-r--r--Acl/Dbal/MutableAclProvider.php6
-rw-r--r--Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php6
-rw-r--r--Core/Validator/Constraints/UserPasswordValidator.php1
-rw-r--r--Http/Firewall/AccessListener.php2
-rw-r--r--Http/Firewall/ExceptionListener.php4
-rw-r--r--Http/RememberMe/PersistentTokenBasedRememberMeServices.php2
6 files changed, 5 insertions, 16 deletions
diff --git a/Acl/Dbal/MutableAclProvider.php b/Acl/Dbal/MutableAclProvider.php
index 8e6b536..edf997b 100644
--- a/Acl/Dbal/MutableAclProvider.php
+++ b/Acl/Dbal/MutableAclProvider.php
@@ -853,7 +853,6 @@ QUERY;
{
$sids = new \SplObjectStorage();
$classIds = new \SplObjectStorage();
- $currentIds = array();
foreach ($changes[1] as $field => $new) {
for ($i = 0, $c = count($new); $i<$c; $i++) {
$ace = $new[$i];
@@ -881,8 +880,6 @@ QUERY;
$aceIdProperty = new \ReflectionProperty('Symfony\Component\Security\Acl\Domain\Entry', 'id');
$aceIdProperty->setAccessible(true);
$aceIdProperty->setValue($ace, intval($aceId));
- } else {
- $currentIds[$ace->getId()] = true;
}
}
}
@@ -931,7 +928,6 @@ QUERY;
$sids = new \SplObjectStorage();
$classIds = new \SplObjectStorage();
- $currentIds = array();
for ($i = 0, $c = count($new); $i<$c; $i++) {
$ace = $new[$i];
@@ -958,8 +954,6 @@ QUERY;
$aceIdProperty = new \ReflectionProperty($ace, 'id');
$aceIdProperty->setAccessible(true);
$aceIdProperty->setValue($ace, intval($aceId));
- } else {
- $currentIds[$ace->getId()] = true;
}
}
}
diff --git a/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php b/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php
index 11c3cda..4f73254 100644
--- a/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php
+++ b/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php
@@ -59,11 +59,7 @@ class PreAuthenticatedAuthenticationProvider implements AuthenticationProviderIn
if (!$user = $token->getUser()) {
throw new BadCredentialsException('No pre-authenticated principal found in request.');
}
- /*
- if (null === $token->getCredentials()) {
- throw new BadCredentialsException('No pre-authenticated credentials found in request.');
- }
- */
+
$user = $this->userProvider->loadUserByUsername($user);
$this->userChecker->checkPostAuth($user);
diff --git a/Core/Validator/Constraints/UserPasswordValidator.php b/Core/Validator/Constraints/UserPasswordValidator.php
index ee9ddda..2dc7fee 100644
--- a/Core/Validator/Constraints/UserPasswordValidator.php
+++ b/Core/Validator/Constraints/UserPasswordValidator.php
@@ -14,7 +14,6 @@ namespace Symfony\Component\Security\Core\Validator\Constraints;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
-use Symfony\Component\Validator\Context\ExecutionContextInterface;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
diff --git a/Http/Firewall/AccessListener.php b/Http/Firewall/AccessListener.php
index 93d20be..6fd68f3 100644
--- a/Http/Firewall/AccessListener.php
+++ b/Http/Firewall/AccessListener.php
@@ -55,7 +55,7 @@ class AccessListener implements ListenerInterface
$request = $event->getRequest();
- list($attributes, $channel) = $this->map->getPatterns($request);
+ list($attributes) = $this->map->getPatterns($request);
if (null === $attributes) {
return;
diff --git a/Http/Firewall/ExceptionListener.php b/Http/Firewall/ExceptionListener.php
index 7001532..213a837 100644
--- a/Http/Firewall/ExceptionListener.php
+++ b/Http/Firewall/ExceptionListener.php
@@ -94,7 +94,7 @@ class ExceptionListener
} elseif ($exception instanceof AccessDeniedException) {
return $this->handleAccessDeniedException($event, $exception);
} elseif ($exception instanceof LogoutException) {
- return $this->handleLogoutException($event, $exception);
+ return $this->handleLogoutException($exception);
}
} while (null !== $exception = $exception->getPrevious());
}
@@ -160,7 +160,7 @@ class ExceptionListener
}
}
- private function handleLogoutException(GetResponseForExceptionEvent $event, LogoutException $exception)
+ private function handleLogoutException(LogoutException $exception)
{
if (null !== $this->logger) {
$this->logger->info('A LogoutException was thrown.', array('exception' => $exception));
diff --git a/Http/RememberMe/PersistentTokenBasedRememberMeServices.php b/Http/RememberMe/PersistentTokenBasedRememberMeServices.php
index d0a70b7..f800668 100644
--- a/Http/RememberMe/PersistentTokenBasedRememberMeServices.php
+++ b/Http/RememberMe/PersistentTokenBasedRememberMeServices.php
@@ -73,7 +73,7 @@ class PersistentTokenBasedRememberMeServices extends AbstractRememberMeServices
if (null !== ($cookie = $request->cookies->get($this->options['name']))
&& count($parts = $this->decodeCookie($cookie)) === 2
) {
- list($series, $tokenValue) = $parts;
+ list($series) = $parts;
$this->tokenProvider->deleteTokenBySeries($series);
}
}