diff --git a/src/Config.py b/src/Config.py index 377784b89..6d8a1a3e0 100644 --- a/src/Config.py +++ b/src/Config.py @@ -8,7 +8,7 @@ class Config(object): def __init__(self, argv): self.version = "0.3.6" - self.rev = 906 + self.rev = 907 self.argv = argv self.action = None self.config_file = "zeronet.conf" diff --git a/src/Ui/media/Wrapper.coffee b/src/Ui/media/Wrapper.coffee index c88c14ddb..a4879e44c 100644 --- a/src/Ui/media/Wrapper.coffee +++ b/src/Ui/media/Wrapper.coffee @@ -388,6 +388,7 @@ if window.opener and window.postmessage_nonce_security == false # Window opener security problem workaround: Open a new window, close this one console.log "Opener present:", window.opener setTimeout ( -> # Wait 200ms to parent tab closing + console.log "Opener still present:", window.opener if window.opener # Opener still present, display message elem = $("
") @@ -400,6 +401,7 @@ if window.opener and window.postmessage_nonce_security == false window.location.reload() # Opener gone, continue init # window.wrapper = new Wrapper(ws_url) - ), 150 + # window.wrapper.reload() + ), 200 else - window.wrapper = new Wrapper(ws_url) \ No newline at end of file + window.wrapper = new Wrapper(ws_url) diff --git a/src/Ui/media/all.js b/src/Ui/media/all.js index 640168547..79e312c2d 100644 --- a/src/Ui/media/all.js +++ b/src/Ui/media/all.js @@ -1270,6 +1270,7 @@ jQuery.extend( jQuery.easing, console.log("Opener present:", window.opener); setTimeout((function() { var elem; + console.log("Opener still present:", window.opener); if (window.opener) { elem = $(" "); elem.find('a').on("click", function() { @@ -1281,7 +1282,7 @@ jQuery.extend( jQuery.easing, } else { return window.location.reload(); } - }), 150); + }), 200); } else { window.wrapper = new Wrapper(ws_url); } diff --git a/src/main.py b/src/main.py index a831f95f6..87e089f85 100644 --- a/src/main.py +++ b/src/main.py @@ -155,7 +155,7 @@ def siteCreate(self): logging.info("Creating content.json...") site = Site(address) - site.content_manager.sign(privatekey=privatekey) + site.content_manager.sign(privatekey=privatekey, extend={"postmessage_nonce_security": True}) site.settings["own"] = True site.saveSettings() @@ -335,6 +335,7 @@ def peerPing(self, peer_ip, peer_port=None): print "Response time: %.3fs (crypt: %s)" % (time.time() - s, peer.connection.crypt) time.sleep(1) + def peerGetFile(self, peer_ip, peer_port, site, filename, benchmark=False): logging.info("Opening a simple connection server") global file_server @@ -355,6 +356,7 @@ def peerGetFile(self, peer_ip, peer_port, site, filename, benchmark=False): else: print peer.getFile(site, filename).read() + def peerCmd(self, peer_ip, peer_port, cmd, parameters): logging.info("Opening a simple connection server") global file_server