Olá Gustavo,

Thanks for your fast reply and your suggestions! ;)

That occurs when using repoze.who.plugins.cookie.InsecureCookiePlugin as 
an identifier.

As I can see cookies are stored as ASCII strings so 
cookie.value.decode('base64') (#1 @ line 25) returns an ASCII string 
which is passed to authenticator's authenticate module.

That's why SA is complaining about getting an ASCII string as username. 
Probably I'll override cookie identify method.

#1 - http://svn.repoze.org/repoze.who/trunk/repoze/who/plugins/cookie.py

Cheers,
Nuno

On 06/02/2010 02:56 PM, Gustavo Narea wrote:
>
> Gustavo Narea<m...@gustavonarea.net>  added the comment:
>
> The SQLAlchemy plugin is not tied to ASCII or Unicode, and you can use it 
> without
> getting any warning as long as you pass the username/password properly 
> encoded.
>
> I cannot apply that patch because some people use ASCII, and also the right 
> place to
> fix this is the repoze.who identifier plugin that you are using, which is not 
> giving
> repoze.who the username/password properly.
>
> Are you using a built-in repoze.who identifier plugin? Or is it maintained by 
> a 3rd party?
>
> If it's a homegrown identifier, you may want to have a look at the code for 
> repoze.who-
> friendlyform which gives repoze.who the credentials with the right charset:
> http://svn.repoze.org/whoplugins/whofriendlyforms/trunk/repoze/who/plugins/friendlyfor
> m.py
>
> Please use the mailing list if you need help to fix the identifier:
> http://lists.repoze.org/listinfo/repoze-dev
>
> Cheers.
>
> ----------
> assignedto:  ->  Gustavo
> nosy: +Gustavo
> priority: bug ->  wish
> status: unread ->  resolved
> topic: +repoze.who
>
> __________________________________
> Repoze Bugs<b...@bugs.repoze.org>
> <http://bugs.repoze.org/issue149>
> __________________________________
> _______________________________________________
> Repoze-dev mailing list
> Repoze-dev@lists.repoze.org
> http://lists.repoze.org/listinfo/repoze-dev
>

_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to