mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Fix url normalization
This commit is contained in:
parent
69c0d33bb1
commit
8443e9c448
1 changed files with 2 additions and 2 deletions
|
@ -428,7 +428,7 @@ def _check_and_normalize_permission_path(url):
|
|||
return url
|
||||
|
||||
if url.startswith('/'):
|
||||
return url.rstrip("/")
|
||||
return '/' + url.strip("/")
|
||||
|
||||
# Uri with domain
|
||||
domains = domain_list()['domains']
|
||||
|
@ -456,7 +456,7 @@ def _check_and_normalize_permission_path(url):
|
|||
|
||||
if '/' in url:
|
||||
path = url.split('/', 1)[1].rstrip('/')
|
||||
return domain + path
|
||||
return domain + '/' + path
|
||||
else:
|
||||
return domain
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue