Project

General

Profile

Task #2471

Task #2470: Python 3 support

encoding errors

Added by Luke Murphey over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
10/21/2019
Due date:
% Done:

100%

Associated revisions

Revision 135 (diff)
Added by lmurphey over 4 years ago

Fixing functional Python 2+3 issues

Reference #2471

History

#1 Updated by Luke Murphey over 4 years ago

Questions:
  • Should I be string encoding the reply?
Observations:
  • RadiusAuth requires that the password be bytes
  • The test test_user_login is failing because the secret is not binary
Options:
  • Convert items() from reply
  • Convert in UserInfo constructor
  • Convert in save()

#2 Updated by Luke Murphey over 4 years ago

test_auth_auth_info_roles_override is failing

Observations:
  • The roles are getting written to the auth CSV
  • loadFile() is not seeing the roles
  • loadRolesMap() seems to be doing the comparison wrong due to username being bytes
Questions:
  • where does the JSON get written?
    • loadFile()

#3 Updated by Luke Murphey over 4 years ago

Things that take bytes:
  • hashlib
  • re (needs to convert from bytse since this is what radius library provides)
  • radius auth

#4 Updated by Luke Murphey over 4 years ago

Problem: test_user_login is failing

Observations
  • Getting the following with userLogin:
    • Logging in with: b'bob' b'hello' b'127.0.0.1' b'testing123'
    • ant test.unit_only -Dtest=TestMainAuthMethods.test_user_login
  • Getting the following with :
    • Logging in with: b'bob' b'hello' b'127.0.0.1' b'testing123'
    • ant test.unit_only -Dtest=TestRadiusAuth.test_auth_valid
  • The issue is that the types are being loaded wrong from the conf file
  • The issue can be fixed by having authenticate() do a conversion to bytes

#5 Updated by Luke Murphey over 4 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF