Commits

Matthew Schinckel committed 859c6b6

Allow passwords to have a ':' in them.

  • Participants
  • Parent commits ebe3954

Comments (0)

Files changed (1)

File rest_api/auth.py

         if len(auth) == 2:
             if auth[0].lower() == 'basic':
                 # Currently, only basic http auth is used.
-                uname, passwd = auth[1].decode('base64').split(':')
+                uname, passwd = auth[1].decode('base64').split(':', 1)
                 user = authenticate(username=uname, password=passwd)
                 if user:
                     if user.is_active:
         if len(auth) == 2:
             if auth[0].lower() == 'basic':
                 # Currently, only basic http auth is used.
-                uname, passwd = auth[1].decode('base64').split(':')
+                uname, passwd = auth[1].decode('base64').split(':', 1)
                 user = authenticate(username=uname, password=passwd)
                 if user and user.is_active:
                     # If the user successfully logged in, then add/overwrite