Hi,

> > the traceback below. I'm using AuthKit which may be the "unicode"  
> > source.
> > Don't be irritated by the "Panda3d" references - it's a 
> normal Python 
> > 2.4 version below it.
> >
> >   File
> > "C:\Panda3D-1.3.2\python\lib\site-packages\paste-1.3-py2.4.egg\paste
> > \auth\au
> > th_tkt.py", line 163, in calculate_digest
> >     digest0 = md5.new(encode_ip_timestamp(ip, timestamp)  + secret
> > + userid
> > + '\0'
> > UnicodeDecodeError: 'ascii' codec can't decode byte 0xbb in 
> position 
> > 5:
> > ordinal not in range(128)
> 
> It's actually from the userid being unicode data I believe. 
> I've seen others report this error before as well. If userid 
> is unicode, its going to try and make them all unicode 
> objects for the + I believe, which then causes the error.

After I changed the timestamp manipulation (shifting bits etc) and the
Chr() to unichr() coding the error disappeared. So everything is now based
on unicode which seems fine for md5. 

I don't know why the ip/timestamp encoding must be done in this way - is
there a security risk if a different method is used?

Regards,
Andrew


_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users

Reply via email to