Exceptions with UTF-8 OpenID URLs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Libravatar (obsolete) |
Fix Released
|
Medium
|
François Marier |
Bug Description
When the OpenID discovery fails with a "consumer.
However, that error message causes an exception if the OpenID URL contains non-ASCII characters like this one:
https:/
Here's the error from the Django logs (/account/
Traceback (most recent call last):
File "/usr/lib/
response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/
return view_func(request, *args, **kwargs)
File "/usr/share/
print "OpenID discovery failed (userid=%s) for %s" % (request.user.id, user_url)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 73: ordinal not in range(128)
Changed in libravatar: | |
status: | Confirmed → Fix Committed |
Changed in libravatar: | |
status: | Fix Committed → Fix Released |
Here's another exception, this time when deleting a photo (/account/ 3789/delete_ photo/) :
Traceback (most recent call last):
File "/usr/lib/ python2. 7/dist- packages/ django/ core/handlers/ base.py" , line 109, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/ python2. 7/dist- packages/ django/ db/transaction. py", line 224, in inner
return func(*args, **kwargs)
File "/usr/lib/ python2. 7/dist- packages/ django/ utils/decorator s.py", line 91, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/usr/lib/ python2. 7/dist- packages/ django/ contrib/ auth/decorators .py", line 20, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/usr/share/ libravatar/ libravatar/ account/ views.py" , line 601, in delete_photo
photo.delete()
File "/usr/share/ libravatar/ libravatar/ account/ models. py", line 162, in delete set_photo( None)
openid.
File "/usr/share/ libravatar/ libravatar/ account/ models. py", line 401, in set_photo photo(photo, None, self.public_hash())
change_
File "/usr/share/ libravatar/ libravatar/ account/ models. py", line 388, in public_hash object. update( lowercase_ value)
hash_
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 32: ordinal not in range(128)