Andrew Smart wrote:
>> -----Ursprüngliche Nachricht-----
>> Von: Ian Bicking [mailto:[EMAIL PROTECTED]
>> Gesendet: Donnerstag, 9. August 2007 17:16
>> An: Andrew Smart
>> Cc: [email protected]
>> Betreff: Re: [Paste] Bug? in paste.auth.auth_tkt.encode_ip_timestamp
>>
>> Andrew Smart wrote:
>>> Hi folks,
>>>
>>> I'm stumbling over an error which is is probably a bug...
>> I'm new in
>>> pylons so I might be wrong...
>>>
>
>> Why would it get converted to unicode? I thought the
>> encode_ip_timestamp stuff was only used for the md5 hash.
>
> Ian,
>
> I don't know why it is converted to unicode - probably because md5() can't
> cope with ascii encoded strings. I just say "it happens" and "it goes wrong"
> ;-)
If you give the traceback it might be clearer. md5 should only handle
str anyway, not unicode. Though maybe one of the other variables here
is unintentionally unicode?
digest0 = md5.new(
encode_ip_timestamp(ip, timestamp) + secret + userid + '\0'
+ tokens + '\0' + user_data).hexdigest()
If so (e.g., userid was unicode) that would cause problems.
--
Ian Bicking : [EMAIL PROTECTED] : http://blog.ianbicking.org
: Write code, do good : http://topp.openplans.org/careers
_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users