Display invalid hosts

This commit is contained in:
shortcutme 2017-06-15 19:49:51 +02:00
parent 2f7bfa95b2
commit e9ce137e14
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -67,7 +67,7 @@ class UiRequest(object):
# Check if host allowed to do request
if not self.isHostAllowed(self.env.get("HTTP_HOST")):
return self.error403("Invalid host", details=False)
return self.error403("Invalid host: %s" % self.env.get("HTTP_HOST"), details=False)
path = re.sub("^http://zero[/]+", "/", path) # Remove begining http://zero/ for chrome extension
path = re.sub("^http://", "/", path) # Remove begining http for chrome extension .bit access
@ -622,7 +622,7 @@ class UiRequest(object):
return """
<h1>%s</h1>
<h2>%s</h3>
""" % (title, message)
""" % (title, cgi.escape(message))
# - Reload for eaiser developing -