mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-21 18:32:04 +08:00
Merge branch 'master' into add-timeout-to-test-framework
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Blockstack Core
|
||||
|
||||
[](https://pypi.python.org/pypi/blockstack/)
|
||||
[](http://slack.blockstack.org/)
|
||||
[](http://slack.blockstack.org/)
|
||||
|
||||
Blockstack is a new decentralized internet where you own your data and your apps run locally without remote servers.
|
||||
|
||||
|
||||
@@ -138,6 +138,8 @@ from .data import datastore_mkdir, datastore_rmdir, make_datastore_info, put_dat
|
||||
|
||||
from .schemas import OP_URLENCODED_PATTERN, OP_NAME_PATTERN, OP_USER_ID_PATTERN, OP_BASE58CHECK_PATTERN
|
||||
|
||||
import keylib
|
||||
|
||||
import virtualchain
|
||||
from virtualchain.lib.ecdsalib import *
|
||||
|
||||
@@ -4386,9 +4388,10 @@ def cli_verify_profile( args, config_path=CONFIG_PATH, proxy=None, interactive=F
|
||||
if hasattr(args, 'pubkey') and args.pubkey is not None:
|
||||
pubkey = str(args.pubkey)
|
||||
try:
|
||||
pubkey = ECPublicKey(pubkey).to_hex()
|
||||
except:
|
||||
return {'error': 'Invalid public key'}
|
||||
pubkey = keylib.ECPublicKey(pubkey).to_hex()
|
||||
except Exception as e:
|
||||
log.exception(e)
|
||||
return {'error': 'Invalid public key : "{}"'.format(pubkey)}
|
||||
|
||||
if pubkey is None:
|
||||
zonefile_data = None
|
||||
|
||||
@@ -24,4 +24,4 @@
|
||||
__version_major__ = '0'
|
||||
__version_minor__ = '14'
|
||||
__version_patch__ = '4'
|
||||
__version__ = '{}.{}.{}.1'.format(__version_major__, __version_minor__, __version_patch__)
|
||||
__version__ = '{}.{}.{}.2'.format(__version_major__, __version_minor__, __version_patch__)
|
||||
|
||||
@@ -364,12 +364,27 @@ class SubdomainRegistrarRPCWorker(threading.Thread):
|
||||
self.server.serve_forever()
|
||||
|
||||
class SubdomainRegistrarRPCHandler(BaseHTTPServer.BaseHTTPRequestHandler):
|
||||
def send_message(self, code, message):
|
||||
def send_message(self, code, message):
|
||||
self.send_response(code)
|
||||
self.send_header("Content-Type", "application/json")
|
||||
self.send_header("Access-Control-Allow-Origin", "*")
|
||||
self.send_header("Content-Type", "application/json")
|
||||
self.end_headers()
|
||||
self.wfile.write(message + "\r\n")
|
||||
|
||||
def do_OPTIONS(self):
|
||||
"""
|
||||
Give back CORS preflight check headers
|
||||
"""
|
||||
self.send_response(200)
|
||||
self.send_header('Access-Control-Allow-Origin', '*') # CORS
|
||||
self.send_header('Access-Control-Allow-Methods', 'GET, POST')
|
||||
self.send_header('Access-Control-Allow-Headers', 'content-type, authorization, range')
|
||||
self.send_header('Access-Control-Expose-Headers', 'content-length')
|
||||
self.send_header('Access-Control-Max-Age', 21600)
|
||||
self.end_headers()
|
||||
return
|
||||
|
||||
|
||||
def do_GET(self):
|
||||
path = self.path
|
||||
if path[-1] == "/":
|
||||
@@ -422,7 +437,7 @@ class SubdomainLock(object):
|
||||
pid = -1
|
||||
return pid != os.getpid()
|
||||
@staticmethod
|
||||
def lockfile_write( fd ):
|
||||
def lockfile_write( fd ):
|
||||
buf = "%s\n" % os.getpid()
|
||||
nw = 0
|
||||
while nw < len(buf):
|
||||
|
||||
Reference in New Issue
Block a user