Commit 52e9cb1c authored by Antoine Catton's avatar Antoine Catton

Use urllib.quote to quote login and password

parent e73e540c
......@@ -28,6 +28,7 @@ from slapos import slap
import time
import re
import urlparse
import urllib
from generic import GenericBaseRecipe
......@@ -97,9 +98,9 @@ class GenericSlapRecipe(GenericBaseRecipe):
netloc = ''
if auth is not None:
auth = tuple(auth)
netloc = str(auth[0]) # Login
netloc = urllib.quote(str(auth[0])) # Login
if len(auth) > 1:
netloc += ':%s' % auth[1] # Password
netloc += ':%s' % urllib.quote(auth[1]) # Password
netloc += '@'
# host is an ipv6 address whithout brackets
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment