Skip to content

Commit

Permalink
[Security] Fix retrieval of encoder when configured for concrete classes
Browse files Browse the repository at this point in the history
  • Loading branch information
asm89 committed Jun 18, 2012
1 parent 024cb91 commit 0be11f4
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -33,7 +33,7 @@ public function __construct(array $encoders)
public function getEncoder($user)
{
foreach ($this->encoders as $class => $encoder) {
if ((is_object($user) && !$user instanceof $class) || (!is_subclass_of($user, $class) && $user != $class)) {
if ((is_object($user) && !$user instanceof $class) || (!is_object($user) && !is_subclass_of($user, $class) && $user != $class)) {
continue;
}

Expand Down

0 comments on commit 0be11f4

Please sign in to comment.