Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 2470

Show
Ignore:
Timestamp:
07/04/09 12:31:58
Author:
fumanchu
Message:

base64.decodestring is deprecated in 3.1.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/python3/cherrypy/lib/auth_basic.py

    r2461 r2470  
    7272                # since CherryPy claims compability with Python 2.3, we must use 
    7373                # the legacy API of base64 
    74                 username_password = base64.decodestring(bytes(params, "ISO-8859-1")) 
     74                username_password = base64.decodebytes(bytes(params, "ISO-8859-1")) 
    7575                username, password = username_password.decode("ISO-8859-1").split(':', 1) 
    7676                if checkpassword(realm, username, password): 
    7777                    request.login = username 
    7878                    return # successful authentication 
    79         except (ValueError, binascii.Error): # split() error, base64.decodestring() error 
     79        except (ValueError, binascii.Error): # split() error, base64.decodebytes() error 
    8080            raise cherrypy.HTTPError(400, 'Bad Request') 
    8181     
  • branches/python3/cherrypy/lib/httpauth.py

    r2467 r2470  
    157157def _parseBasicAuthorization (auth_params): 
    158158    params = auth_params.encode('ascii') 
    159     params = base64.decodestring(params) 
     159    params = base64.decodebytes(params) 
    160160    username, password = params.decode('ISO-8859-1').split(":", 1) 
    161161    return {"username": username, "password": password} 

Hosted by WebFaction

Log in as guest/cpguest to create tickets