mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-03 20:35:13 +00:00
sig warning + lookup from default url
This commit is contained in:
parent
a6fa869a26
commit
46d5f7dd6e
1 changed files with 14 additions and 4 deletions
|
@ -73,15 +73,25 @@ if __name__ == '__main__':
|
||||||
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': signer = uv
|
elif k =='signer':
|
||||||
|
signer = uv
|
||||||
|
if not wallet.is_valid(signer):
|
||||||
|
print signer
|
||||||
|
print "trying canonical URL"
|
||||||
|
import urllib
|
||||||
|
url = 'http://'+signer+'/bitcoin.id'
|
||||||
|
print url
|
||||||
|
signer = urllib.urlopen(url).read().strip()
|
||||||
|
print repr(signer)
|
||||||
|
|
||||||
else: print k,v
|
else: print k,v
|
||||||
if k in ['signer','signature']:
|
if k in ['signer','signature']:
|
||||||
cmd = cmd.replace('&%s=%s'%(k,v),'')
|
cmd = cmd.replace('&%s=%s'%(k,v),'')
|
||||||
|
|
||||||
if signature:
|
|
||||||
wallet.verify_message(signer, signature, cmd )
|
|
||||||
|
|
||||||
gui.set_send_tab(address, amount, label)
|
gui.set_send_tab(address, amount, label)
|
||||||
|
if signature:
|
||||||
|
if not wallet.verify_message(signer, 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.main()
|
gui.main()
|
||||||
wallet.save()
|
wallet.save()
|
||||||
|
|
Loading…
Add table
Reference in a new issue