mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-03 15:38:59 +00:00
Ensure we don't have any trailing slashes when matching paths in the ftp site pickle.
This commit is contained in:
@ -54,7 +54,7 @@ def ftpbrowser(request, subpath):
|
||||
if allnodes[parent][d]['t'] == 'd':
|
||||
canonpath = os.path.join(canonpath, d)
|
||||
elif allnodes[parent][d]['t'] == 'l':
|
||||
canonpath = os.path.join(canonpath, allnodes[parent][d]['d'])
|
||||
canonpath = os.path.join(canonpath, allnodes[parent][d]['d']).strip('/')
|
||||
else:
|
||||
# There's a matching node, but it's not a link or a directory
|
||||
raise Http404
|
||||
|
Reference in New Issue
Block a user