btimby/py-radius — Issue #2: IndexError when passwd > 16
Author: diegows
Created: 2012-03-07 22:09:08+00:00
State: open

The module fails when the user password is bigger than 16.

Traceback (most recent call last):
File "/usr/lib/python2.7/pdb.py", line 1314, in main
pdb._runscript(mainpyfile)
File "/usr/lib/python2.7/pdb.py", line 1233, in _runscript
self.run(statement)
File "/usr/lib/python2.7/bdb.py", line 387, in run
exec cmd in globals, locals
File "", line 1, in
File "/usr/local/bin/squid-radius-auth.py", line 3, in
from radius import RADIUS, NoResponse
File "/usr/local/lib/python2.7/dist-packages/radius.py", line 143, in authenticate
encpass = self.radcrypt(authenticator,passwd,1)
File "/usr/local/lib/python2.7/dist-packages/radius.py", line 121, in radcrypt
r = r + chr( ord(md5vec[i]) ^ ord(text[i]) )
IndexError: string index out of range