Przeglądaj źródła

[Security] fixes a possible bug when username is an integer

Johannes M. Schmitt 14 lat temu
rodzic
commit
971ff8175f

+ 1 - 1
src/Symfony/Component/Security/Acl/Domain/UserSecurityIdentity.php

@@ -40,7 +40,7 @@ final class UserSecurityIdentity implements SecurityIdentityInterface
             throw new \InvalidArgumentException('$class must not be empty.');
         }
 
-        $this->username = $username;
+        $this->username = (string) $username;
         $this->class = $class;
     }