s/signer/identity
This commit is contained in:
parent
85c16d10d7
commit
9d722db1f4
@ -66,31 +66,31 @@ if __name__ == '__main__':
|
|||||||
else:
|
else:
|
||||||
params = []
|
params = []
|
||||||
|
|
||||||
amount = label = signature = signer = ''
|
amount = label = signature = identity = ''
|
||||||
for p in params:
|
for p in params:
|
||||||
k,v = p.split('=')
|
k,v = p.split('=')
|
||||||
uv = urldecode(v)
|
uv = urldecode(v)
|
||||||
if k=='amount': amount = uv
|
if k=='amount': amount = uv
|
||||||
elif k=='label': label = uv
|
elif k=='label': label = uv
|
||||||
elif k =='signature': signature = uv
|
elif k =='signature': signature = uv
|
||||||
elif k =='signer':
|
elif k =='identity':
|
||||||
signer = uv
|
identity = uv
|
||||||
if not wallet.is_valid(signer):
|
if not wallet.is_valid(identity):
|
||||||
import urllib
|
import urllib
|
||||||
url = 'http://'+signer+'/bitcoin.id'
|
url = 'http://'+identity+'/bitcoin.id'
|
||||||
try:
|
try:
|
||||||
signer = urllib.urlopen(url).read().strip()
|
identity = urllib.urlopen(url).read().strip()
|
||||||
except:
|
except:
|
||||||
# no need to display something, the signature verification will fail anyway
|
# no need to display something, the signature verification will fail anyway
|
||||||
pass
|
pass
|
||||||
|
|
||||||
else: print k,v
|
else: print k,v
|
||||||
if k in ['signer','signature']:
|
if k in ['identity','signature']:
|
||||||
cmd = cmd.replace('&%s=%s'%(k,v),'')
|
cmd = cmd.replace('&%s=%s'%(k,v),'')
|
||||||
|
|
||||||
gui.set_send_tab(address, amount, label)
|
gui.set_send_tab(address, amount, label)
|
||||||
if signature:
|
if signature:
|
||||||
if not wallet.verify_message(signer, signature, cmd ):
|
if not wallet.verify_message(identity, signature, cmd ):
|
||||||
gui.show_message('Warning: the URI contains a bad signature.\nThe identity of the recipient cannot be verified.\nPay at your own risks!')
|
gui.show_message('Warning: the URI contains a bad signature.\nThe identity of the recipient cannot be verified.\nPay at your own risks!')
|
||||||
|
|
||||||
gui.main()
|
gui.main()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user