Merge pull request #4338 from dokku/4106-strip-slashes
Strip trailing slashes in hostname from web installer
This commit is contained in:
1 file changed
+2
-2
@@ -154,7 +154,7 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
|||||||
if 'vhost' in params and params['vhost'].value == 'true':
|
if 'vhost' in params and params['vhost'].value == 'true':
|
||||||
vhost_enable = 'true'
|
vhost_enable = 'true'
|
||||||
with open(vhost_filename, 'w') as f:
|
with open(vhost_filename, 'w') as f:
|
||||||
f.write(params['hostname'].value)
|
f.write(params['hostname'].value.strip("/"))
|
||||||
shutil.chown(vhost_filename, dokku_user, dokku_group)
|
shutil.chown(vhost_filename, dokku_user, dokku_group)
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
@@ -165,7 +165,7 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
|||||||
hostname_filename = '{0}/HOSTNAME'.format(dokku_root)
|
hostname_filename = '{0}/HOSTNAME'.format(dokku_root)
|
||||||
|
|
||||||
with open(hostname_filename, 'w') as f:
|
with open(hostname_filename, 'w') as f:
|
||||||
f.write(params['hostname'].value)
|
f.write(params['hostname'].value.strip("/"))
|
||||||
|
|
||||||
shutil.chown(hostname_filename, dokku_user, dokku_group)
|
shutil.chown(hostname_filename, dokku_user, dokku_group)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user