Skip to content

Commit

Permalink
cli: Improve quote of usernames and passwords
Browse files Browse the repository at this point in the history
Instruct the urllib quote function to also quote '/'.
  • Loading branch information
garberg committed Nov 4, 2024
1 parent 64cde37 commit ce08819
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nipap-cli/nipap_cli/nipap_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ def setup_connection():
con_params['password'] = getpass.getpass()

# Quote username & password
con_params['username'] = quote(con_params['username'])
con_params['password'] = quote(con_params['password'])
con_params['username'] = quote(con_params['username'], safe="")
con_params['password'] = quote(con_params['password'], safe="")

# build XML-RPC URI
pynipap.xmlrpc_uri = "%(protocol)s://%(username)s:%(password)s@%(hostname)s:%(port)s" % con_params
Expand Down

0 comments on commit ce08819

Please sign in to comment.