djoos / EscapeWSSEAuthenticationBundle

Symfony bundle to implement WSSE authentication
http://symfony.com/doc/current/cookbook/security/custom_authentication_provider.html
137 stars 59 forks source link

urldecode UsernameToken #52

Closed clicktrend closed 10 years ago

clicktrend commented 10 years ago

UsernameToken strings with non ascii letters fail to authenticate.

Add

$user = $this->userProvider->loadUserByUsername(urldecode($token->getUsername()));

in Escape\WSSEAuthenticationBundle\Security\Core\Authentication\Provider\Provider at line 43

djoos commented 10 years ago

Hi @clicktrend,

thanks for getting in touch!

Unfortunately I don't think the issue lies within the bundle - $token->getUsername() will make use of Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php's getUsername-method, which in its turn will use your user class' getUsername-method.

In this case I'd actually add in urldecode in your user's class, as that is where the issue actually lies...

I'll close this issue for now - but I am looking forward to hearing your feedback via this thread!

Kind regards, David