auth_tkt incompatibe? repoze.who==1.0.19/ Paste==1.5.1

17 views
Skip to first unread message

kgk

unread,
Dec 9, 2011, 12:22:18 PM12/9/11
to paste...@googlegroups.com
I am tryring to use auth_tkt tokens in a turbogears 2.1.3 project.  The docs suggest I can add tokens to be stored in the cookie
using something like 
identity['tokens'] = [ 'mytoken' ] 

However, I see the following code repoze.who:remember (1.0.19)  

        if not isinstance(tokens, basestring):
            who_tokens = ','.join(who_tokens)
       ...

          ticket = auth_tkt.AuthTicket(
                self.secret,
                who_userid,
                remote_addr,
                tokens=who_tokens,
                user_data=who_userdata,
                cookie_name=self.cookie_name,
                secure=self.secure)

And then again in paste.uath.auth_tkt:__init__

       self.tokens = ','.join(tokens)

Which basically turns  my token into 
'm,y,t,o,k,e,n'

A simple patch would be to check that it's a list before the join


kgk

unread,
Dec 9, 2011, 12:23:21 PM12/9/11
to paste...@googlegroups.com
Of course I meant Paste 1.7.5.1 !

> --
> You received this message because you are subscribed to the Google Groups
> "Paste Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/paste-users/-/ZIkzMLBKuCgJ.
> To post to this group, send email to paste...@googlegroups.com.
> To unsubscribe from this group, send email to
> paste-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/paste-users?hl=en.

--
Kristian G. Kvilekval (kkvil...@gmail.com) 805-636-1599

Reply all
Reply to author
Forward
0 new messages