Bug 524975

Summary: backport upstream bug fix in python-openid
Product: [Fedora] Fedora EPEL Reporter: BJ Dierkes <derks>
Component: python-openidAssignee: Patrick Uiterwijk <puiterwijk>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: el5CC: jeff, puiterwijk
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python-openid-2.1.1-4.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-20 17:05:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.