Skip to content

Commit

Permalink
Rev2067, Fix inner_path stripping
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcutme committed May 11, 2017
1 parent f4f4aa0 commit d467aab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/Mute/MutePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def actionWrapper(self, path, extra_headers=None):
extra_headers = []
self.sendHeader(extra_headers=extra_headers[:])
return iter([super(UiRequestPlugin, self).renderWrapper(
site, path, site.address + "//uimedia/plugins/mute/blacklisted.html?address=" + address,
site, path, "uimedia/plugins/mute/blacklisted.html?address=" + address,
"Blacklisted site", extra_headers, show_loadingscreen=False
)])
else:
Expand Down
2 changes: 1 addition & 1 deletion src/Config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Config(object):

def __init__(self, argv):
self.version = "0.5.4"
self.rev = 2066
self.rev = 2067
self.argv = argv
self.action = None
self.config_file = "zeronet.conf"
Expand Down
3 changes: 2 additions & 1 deletion src/Ui/UiRequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,11 @@ def renderWrapper(self, site, path, inner_path, title, extra_headers, show_loadi

address = re.sub("/.*", "", path.lstrip("/"))
if self.isProxyRequest() and (not path or "/" in path[1:]):
file_url = re.sub("^.*?/", "", inner_path)
if self.env["HTTP_HOST"] == "zero":
root_url = "/" + address + "/"
file_url = "/" + address + "/" + inner_path
else:
file_url = "/" + inner_path
root_url = "/"

else:
Expand Down

0 comments on commit d467aab

Please sign in to comment.