Bug 524975 - backport upstream bug fix in python-openid
Summary: backport upstream bug fix in python-openid
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: python-openid
Version: el5
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Patrick Uiterwijk
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-22 20:18 UTC by BJ Dierkes
Modified: 2014-05-20 17:05 UTC (History)
2 users (show)

Fixed In Version: python-openid-2.1.1-4.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-20 17:05:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description BJ Dierkes 2009-09-22 20:18:02 UTC
Description of problem:

As per the bug report here: http://lists.openidenabled.com/pipermail/dev/2008-November/001441.html.  This problem was encountered when enabling the OpenID plugin in Moin 1.8.

On EL5 (python-2.4) the following traceback is encountered:

'HashContainer' object has no attribute 'digest_size'



Version-Release number of selected component (if applicable):

python-openid-2.1.1-3.el5


How reproducible:

Everytime


Steps to Reproduce:

>>> hmac.new("key", "text", sha256_module)


  
Actual results:

Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File "/usr/lib/python2.4/hmac.py", line 107, in new
     return HMAC(key, msg, digestmod)
   File "/usr/lib/python2.4/hmac.py", line 44, in __init__
     self.digest_size = digestmod.digest_size
AttributeError: 'HashContainer' object has no attribute 'digest_size'



Expected results:

No traceback.


Patch (as listed in original link):

--- python-openid-2.2.1/openid/cryptutil.py	2008-06-27  
23:48:11.000000000 +0100
+++ /usr/lib/python2.4/site-packages/openid/cryptutil.py	2008-11-20  
17:49:35.000000000 +0000
@@ -46,6 +46,7 @@
      class HashContainer(object):
          def __init__(self, hash_constructor):
              self.new = hash_constructor
+	    self.digest_size = hash_constructor().digest_size

      sha1_module = HashContainer(hashlib.sha1)
      sha256_module = HashContainer(hashlib.sha256)

Comment 1 Patrick Uiterwijk 2014-04-30 18:51:09 UTC
Thanks for the patch.

Comment 2 Fedora Update System 2014-04-30 18:57:34 UTC
python-openid-2.1.1-4.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/python-openid-2.1.1-4.el5

Comment 3 Fedora Update System 2014-05-01 18:29:51 UTC
Package python-openid-2.1.1-4.el5:
* should fix your issue,
* was pushed to the Fedora EPEL 5 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing python-openid-2.1.1-4.el5'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2014-1296/python-openid-2.1.1-4.el5
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2014-05-20 17:05:02 UTC
python-openid-2.1.1-4.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.