After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 638480 - Tomboy fails to authenticate
Tomboy fails to authenticate
Status: RESOLVED FIXED
Product: snowy
Classification: Deprecated
Component: general
git master
Other Linux
: Normal blocker
: future
Assigned To: snowy-maint
snowy-maint
Depends on:
Blocks:
 
 
Reported: 2011-01-02 02:48 UTC by Matthew
Modified: 2011-05-09 04:16 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Matthew 2011-01-02 02:48:23 UTC
Django Error Page: http://pyther.net/a/tomboy_snowy_error.html


Installed Packages:
local/django 1.2.4-1
local/python2 2.7.1-3

Let me know what other info is needed

Full Text:
Environment:

Request Method: POST
Request URL: https://snowy.pyther.net/oauth/request_token/
Django Version: 1.2.4
Python Version: 2.7.1
Installed Applications:
['core',
 'api',
 'accounts',
 'django_openid_auth',
 'notes',
 'mobile_notes',
 'export',
 'django.contrib.admin',
 'django.contrib.admindocs',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.humanize',
 'django.contrib.messages',
 'registration',
 'south',
 'gravatar',
 'autoslug',
 'piston',
 'pagination']
Installed Middleware:
['django.middleware.common.CommonMiddleware',
 'django.contrib.csrf.middleware.CsrfViewMiddleware',
 'django.contrib.csrf.middleware.CsrfResponseMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'snowy.accounts.middleware.LocaleMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'snowy.accounts.middleware.LoginRedirectMiddleware',
 'django.middleware.transaction.TransactionMiddleware',
 'recaptcha_django.middleware.ReCaptchaMiddleware',
 'pagination.middleware.PaginationMiddleware']


Traceback:
  • File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 100 in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  • File "/usr/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 39 in wrapped_view
    resp = view_func(*args, **kwargs)
  • File "/usr/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 52 in wrapped_view
    return view_func(*args, **kwargs)
  • File "/srv/http/snowy/lib/piston/authentication.py", line 163 in oauth_request_token
    token = oauth_server.fetch_request_token(oauth_request)
  • File "/srv/http/snowy/lib/piston/oauth.py", line 403 in fetch_request_token
    self._check_signature(oauth_request, consumer, None)
  • File "/srv/http/snowy/lib/piston/oauth.py", line 500 in _check_signature
    token, signature)
  • File "/srv/http/snowy/lib/piston/oauth.py", line 596 in check_signature
    built = self.build_signature(oauth_request, consumer, token)
  • File "/srv/http/snowy/lib/piston/oauth.py", line 630 in build_signature
    hashed = hmac.new(key, raw, sha)
  • File "/usr/lib/python2.7/hmac.py", line 133 in new
    return HMAC(key, msg, digestmod)
  • File "/usr/lib/python2.7/hmac.py", line 72 in __init__
    self.outer.update(key.translate(trans_5C))
Exception Type: TypeError at /oauth/request_token/
Exception Value: character mapping must return integer, None or unicode
Comment 1 Sandy Armstrong 2011-01-02 02:58:14 UTC
See also: http://bugs.python.org/issue5285

Looks like piston may have been relying on behavior that has since been "fixed".
Comment 2 Jeff Schroeder 2011-01-24 19:00:38 UTC
Just out of curiosity, what distro / python version are you running? I'm pretty sure I've got this fixed on my laptop at home running a Fedora 14 VM with python2.7.
Comment 3 Jeff Schroeder 2011-01-24 19:02:16 UTC
You'll have a patch to test out tonight.
Comment 4 Matthew 2011-01-24 21:35:39 UTC
That would be awesome. I am using django 1.2.4 and python2 2.7.1 on Arch Linux.
Comment 5 Scott Zawalski 2011-01-25 08:30:54 UTC
I'm also eagerly awaiting a patch to test. 

Ubuntu Natty django 1.2.3, python 2.7.1, piston 0.2.2
Comment 6 Jeff Schroeder 2011-01-25 13:04:46 UTC
After encoding the key to ascii (vs unicode) and trying a fresh database + openid, it no longer causes snowy to flip out and traceback, but it says the Nonce is out of range. It will require a bit more digging.
Comment 7 Scott Zawalski 2011-02-23 07:40:56 UTC
Any updates here?
Comment 8 Jeff Schroeder 2011-05-09 04:06:08 UTC
Can someone other than me exhibiting this problem try this patch?
http://www.digitalprognosis.com/0001-Fix-the-longstanding-python-2.7-bug.patch

Try it with existing openid users, new openid accounts, and then please try it on a fresh database with all of the various combinations. Lastly, don't forget to try regular-old password authentication.

Please don't forget to let me know if it worked or not and what distro/django/python versions you're using.
Comment 9 Jeff Schroeder 2011-05-09 04:16:37 UTC
Actually, that patch seems to fix it. Fixed in:
7787cea4e488b2593d229c6d0252799de7b7344c

Please pull the latest git version and all should be well.