Log wrapper nonce errors

This commit is contained in:
shortcutme 2018-04-28 22:02:10 +02:00
parent b53b6723cc
commit 8e708dc02a
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -123,9 +123,13 @@ class UiRequest(object):
return self.actionSiteAdd()
# Site media wrapper
else:
if self.get.get("wrapper_nonce") and self.get["wrapper_nonce"] in self.server.wrapper_nonces:
self.server.wrapper_nonces.remove(self.get["wrapper_nonce"])
return self.actionSiteMedia("/media" + path) # Only serve html files with frame
if self.get.get("wrapper_nonce"):
if self.get["wrapper_nonce"] in self.server.wrapper_nonces:
self.server.wrapper_nonces.remove(self.get["wrapper_nonce"])
return self.actionSiteMedia("/media" + path) # Only serve html files with frame
else:
self.server.log.warning("Invalid wrapper nonce: %s" % self.get["wrapper_nonce"])
body = self.actionWrapper(path)
else:
body = self.actionWrapper(path)
if body: