Disabled benchmarking in MultiUser

The Benchmarking function is CPU intensive, so someone could easily DOS
a proxy.

Pointed out in:
http://127.0.0.1:43110/Talk.ZeroNetwork.bit/?Topic:1_1LJP7tDoGnWNppUGJoNS8cJbmYTS1TecCC/Zero+proxies+vulnerability
This commit is contained in:
AceLewis 2016-03-13 22:47:34 +00:00
parent 950638ea77
commit e7b041406e
1 changed files with 6 additions and 0 deletions

View File

@ -152,6 +152,12 @@ class UiWebsocketPlugin(object):
self.actionUserLoginForm(0)
# Disable not Multiuser safe functions
def actionBenchmark(self, to, *args, **kwargs):
if not config.multiuser_local:
self.cmd("notification", ["info", "This function is disabled on this proxy"])
else:
return super(UiWebsocketPlugin, self).actionSiteDelete(to, *args, **kwargs)
def actionSiteDelete(self, to, *args, **kwargs):
if not config.multiuser_local:
self.cmd("notification", ["info", "This function is disabled on this proxy"])