mirror of
https://github.com/HelloZeroNet/ZeroNet.git
synced 2023-12-14 04:33:03 +01:00
Only display sign error if there is no stored privatekey
This commit is contained in:
parent
589869c5ed
commit
a2d29a4531
1 changed files with 5 additions and 4 deletions
|
@ -461,10 +461,11 @@ class UiWebsocket(object):
|
|||
|
||||
if privatekey == "stored": # Get privatekey from sites.json
|
||||
privatekey = self.user.getSiteData(self.site.address).get("privatekey")
|
||||
self.cmd("notification", ["error", _["Content signing failed"] + "<br><small>Private key not found in sites.json </small>"])
|
||||
self.response(to, {"error": "Site sign failed: Private key not stored."})
|
||||
self.log.error("Site sign failed: %s: Private key not stored in sites.json" % inner_path)
|
||||
return
|
||||
if not privatekey:
|
||||
self.cmd("notification", ["error", _["Content signing failed"] + "<br><small>Private key not found in sites.json </small>"])
|
||||
self.response(to, {"error": "Site sign failed: Private key not stored."})
|
||||
self.log.error("Site sign failed: %s: Private key not stored in sites.json" % inner_path)
|
||||
return
|
||||
if not privatekey: # Get privatekey from users.json auth_address
|
||||
privatekey = self.user.getAuthPrivatekey(self.site.address)
|
||||
|
||||
|
|
Loading…
Reference in a new issue