diff --git a/src/Db/Db.py b/src/Db/Db.py index d1d9ce159..3d4b6d7da 100644 --- a/src/Db/Db.py +++ b/src/Db/Db.py @@ -1,3 +1,5 @@ +## please note that this file uses custom db cursor and thus may surprise you with how sql queries are performed + import sqlite3 import json import time diff --git a/src/Site/Site.py b/src/Site/Site.py index ea19c4a25..7deab5cc5 100644 --- a/src/Site/Site.py +++ b/src/Site/Site.py @@ -35,7 +35,6 @@ class Site(object): def __init__(self, address, allow_create=True, settings=None): self.address = str(re.sub("[^A-Za-z0-9]", "", address)) # Make sure its correct address self.address_hash = hashlib.sha256(self.address.encode("ascii")).digest() - self.address_sha1 = hashlib.sha1(self.address.encode("ascii")).digest() self.address_short = "%s..%s" % (self.address[:6], self.address[-4:]) # Short address for logging self.log = logging.getLogger("Site:%s" % self.address_short) self.addEventListeners() diff --git a/src/Ui/UiRequest.py b/src/Ui/UiRequest.py index e34d22cb6..1b2d5cf31 100644 --- a/src/Ui/UiRequest.py +++ b/src/Ui/UiRequest.py @@ -372,7 +372,7 @@ def formatRedirect(self, url): # Redirect to an url def actionRedirect(self, url): self.start_response('301 Redirect', [('Location', str(url))]) - yield self.formatRedirect(url) + return self.formatRedirect(url) def actionIndex(self): return self.actionRedirect("/" + config.homepage + "/") @@ -634,7 +634,9 @@ def parsePath(self, path): match = re.match(r"/(media/)?(?P
[A-Za-z0-9]+[A-Za-z0-9\._-]+)(?P