Rev2035, Dont sign same onion address multiple time
This commit is contained in:
parent
fe2344ea12
commit
d7db7a8060
2 changed files with 5 additions and 3 deletions
|
@ -103,8 +103,10 @@ class SitePlugin(object):
|
||||||
request["need_num"] = 0
|
request["need_num"] = 0
|
||||||
for site in sites:
|
for site in sites:
|
||||||
onion = self.connection_server.tor_manager.getOnion(site.address)
|
onion = self.connection_server.tor_manager.getOnion(site.address)
|
||||||
sign = CryptRsa.sign(res["onion_sign_this"], self.connection_server.tor_manager.getPrivatekey(onion))
|
publickey = self.connection_server.tor_manager.getPublickey(onion)
|
||||||
request["onion_signs"][self.connection_server.tor_manager.getPublickey(onion)] = sign
|
if publickey not in request["onion_signs"]:
|
||||||
|
sign = CryptRsa.sign(res["onion_sign_this"], self.connection_server.tor_manager.getPrivatekey(onion))
|
||||||
|
request["onion_signs"][publickey] = sign
|
||||||
res = tracker.request("announce", request)
|
res = tracker.request("announce", request)
|
||||||
if not res or "onion_sign_this" in res:
|
if not res or "onion_sign_this" in res:
|
||||||
self.log.debug("Announce onion address to %s failed: %s" % (tracker_address, res))
|
self.log.debug("Announce onion address to %s failed: %s" % (tracker_address, res))
|
||||||
|
|
|
@ -10,7 +10,7 @@ class Config(object):
|
||||||
|
|
||||||
def __init__(self, argv):
|
def __init__(self, argv):
|
||||||
self.version = "0.5.3"
|
self.version = "0.5.3"
|
||||||
self.rev = 2034
|
self.rev = 2035
|
||||||
self.argv = argv
|
self.argv = argv
|
||||||
self.action = None
|
self.action = None
|
||||||
self.config_file = "zeronet.conf"
|
self.config_file = "zeronet.conf"
|
||||||
|
|
Loading…
Reference in a new issue