Rev619, Fix sitesign without users.json, Fix readme typo

This commit is contained in:
HelloZeroNet 2015-11-28 18:04:59 +01:00
parent 85c2799cb6
commit 675bd46255
3 changed files with 7 additions and 4 deletions

View file

@ -37,7 +37,7 @@ Decentralized websites using Bitcoin crypto and the BitTorrent network - http://
* When you visit a new zeronet site, it tries to find peers using the BitTorrent * When you visit a new zeronet site, it tries to find peers using the BitTorrent
network so it can download the site files (html, css, js...) from them. network so it can download the site files (html, css, js...) from them.
* Each visited site becomes also served by you. * Each visited site becomes also served by you.
* Every site contains a `site.json` which holds all other files in a sha512 hash * Every site contains a `content.json` which holds all other files in a sha512 hash
and a signature generated using site's private key. and a signature generated using site's private key.
* If the site owner (who has the private key for the site address) modifies the * If the site owner (who has the private key for the site address) modifies the
site, then he/she signs the new `content.json` and publishes it to the peers. site, then he/she signs the new `content.json` and publishes it to the peers.

View file

@ -8,7 +8,7 @@ class Config(object):
def __init__(self, argv): def __init__(self, argv):
self.version = "0.3.3" self.version = "0.3.3"
self.rev = 618 self.rev = 619
self.argv = argv self.argv = argv
self.action = None self.action = None
self.createParser() self.createParser()

View file

@ -153,8 +153,11 @@ class Actions(object):
if not privatekey: # If no privatekey definied if not privatekey: # If no privatekey definied
from User import UserManager from User import UserManager
user = UserManager.user_manager.get() user = UserManager.user_manager.get()
if user:
site_data = user.getSiteData(address) site_data = user.getSiteData(address)
privatekey = site_data.get("privatekey") privatekey = site_data.get("privatekey")
else:
privatekey = None
if not privatekey: if not privatekey:
# Not found in users.json, ask from console # Not found in users.json, ask from console
import getpass import getpass