Modify

Opened 18 years ago

Closed 9 years ago

#1101 closed defect (wontfix)

OpenID plugin fails with: number of bits must be greater than zero

Reported by: sander.sweers@… Owned by: cygnus
Priority: high Component: OpenidPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

I got this while testing the plugin for a project. Any help would be appreciated.

Thanks Sander

Python Traceback

Traceback (most recent call last):

File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 379, in dispatch_request

dispatcher.dispatch(req)

File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 230, in dispatch

resp = chosen_handler.process_request(req)

File "build/bdist.linux-x86_64/egg/openidauth/auth.py", line 162, in process_request File "build/bdist.linux-x86_64/egg/openidauth/auth.py", line 205, in _start_login File "/usr/lib/python2.4/site-packages/openid/consumer/consumer.py", line 308, in begin

return self.beginWithoutDiscovery(service)

File "/usr/lib/python2.4/site-packages/openid/consumer/consumer.py", line 331, in beginWithoutDiscovery

auth_req = self.consumer.begin(service)

File "/usr/lib/python2.4/site-packages/openid/consumer/consumer.py", line 423, in begin

assoc = self._getAssociation(service_endpoint.server_url)

File "/usr/lib/python2.4/site-packages/openid/consumer/consumer.py", line 619, in _getAssociation

assoc_session, args = self._createAssociateRequest(server_url)

File "/usr/lib/python2.4/site-packages/openid/consumer/consumer.py", line 639, in _createAssociateRequest

assoc_session = session_type()

File "/usr/lib/python2.4/site-packages/openid/consumer/consumer.py", line 378, in init

dh = DiffieHellman.fromDefaults()

File "/usr/lib/python2.4/site-packages/openid/dh.py", line 17, in fromDefaults

return cls(cls.DEFAULT_MOD, cls.DEFAULT_GEN)

File "/usr/lib/python2.4/site-packages/openid/dh.py", line 25, in init

self._setPrivate(cryptutil.randrange(1, modulus - 1))

File "/usr/lib/python2.4/random.py", line 189, in randrange

return int(istart + self._randbelow(width))

File "/usr/lib/python2.4/random.py", line 236, in _randbelow

r = getrandbits(k)

File "/usr/lib/python2.4/random.py", line 764, in getrandbits

raise ValueError('number of bits must be greater than zero')

ValueError: number of bits must be greater than zero

Attachments (0)

Change History (4)

comment:1 Changed 18 years ago by wkornewald

Owner: changed from wkornewald to cygnus

Assigning to new owner.

comment:2 Changed 18 years ago by sander.sweers@…

Testing it a bit more and found this does not happen when trac is run under mod_python. The trace above is only when it is run as a cgi.

comment:3 Changed 17 years ago by Dalius

If you want you can test this problem with AuthOpenIdPlugin which uses newer version of OpenID library which is potential source of problem.

comment:4 Changed 9 years ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

Plugin is deprecated. See AuthOpenIdPlugin for an alternative.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain cygnus.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.