You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a working server written for Linux machines that performs the functionality I require (authentication requests only). I, unfortunately, also need it to function on Windows machines, and I discovered that pyrad has a dependency issue when on Windows machines. The curved.py (which uses twisted) included in pyrad apparently will work around this (#16).
I've modified my code for an implementation that inherits from curved.RADIUSAccess. One issue that I have had with curved is the datagramReceived is not being properly overloaded and was calling self.CreatePacket instead of self.CreateAuthPacket. I discovered this by attempting to call pkt.PwDecrypt. I had to overload datagramReceived in order to fix this issue.
Now, when I call pkt.PwDecrypt(pkt[attr][0]), where attr = "User-Password", I get the following traceback:
Traceback (most recent call last):
File "C:\Users\michael.dresser\AppData\Local\Programs\Python\Python35\lib\site-packages\twisted\python\log.py", line 86, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "C:\Users\michael.dresser\AppData\Local\Programs\Python\Python35\lib\site-packages\twisted\python\context.py", line 122, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "C:\Users\michael.dresser\AppData\Local\Programs\Python\Python35\lib\site-packages\twisted\python\context.py", line 85, in callWithContext
return func(*args,**kw)
File "C:\Users\michael.dresser\AppData\Local\Programs\Python\Python35\lib\site-packages\twisted\internet\selectreactor.py", line 149, in _doReadOrWrite
why = getattr(selectable, method)()
--- <exception caught here> ---
File "C:\Users\michael.dresser\AppData\Local\Programs\Python\Python35\lib\site-packages\twisted\internet\udp.py", line 249, in doRead
self.protocol.datagramReceived(data, addr)
File ".\owRadiusServer_win.py", line 39, in datagramReceived
self.processPacket(pkt)
File ".\owRadiusServer_win.py", line 60, in processPacket
RAD_REQUEST[attr] = pkt.PwDecrypt(pkt[attr][0])
File "C:\Users\michael.dresser\AppData\Local\Programs\Python\Python35\lib\site-packages\pyrad\packet.py", line 477, in PwDecrypt
return pw.decode('utf-8')
builtins.UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8e in position 0: invalid start byte
The "invalid start byte" is not always at position 0, but I always get this error. What can I do to resolve this?
Note: Using python 3.5.4, and the same issue occurs with 2.7.14
The text was updated successfully, but these errors were encountered:
I have a working server written for Linux machines that performs the functionality I require (authentication requests only). I, unfortunately, also need it to function on Windows machines, and I discovered that pyrad has a dependency issue when on Windows machines. The curved.py (which uses twisted) included in pyrad apparently will work around this (#16).
I've modified my code for an implementation that inherits from curved.RADIUSAccess. One issue that I have had with curved is the datagramReceived is not being properly overloaded and was calling self.CreatePacket instead of self.CreateAuthPacket. I discovered this by attempting to call pkt.PwDecrypt. I had to overload datagramReceived in order to fix this issue.
Now, when I call pkt.PwDecrypt(pkt[attr][0]), where attr = "User-Password", I get the following traceback:
The "invalid start byte" is not always at position 0, but I always get this error. What can I do to resolve this?
Note: Using python 3.5.4, and the same issue occurs with 2.7.14
The text was updated successfully, but these errors were encountered: