mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-21 16:14:23 +01:00
commando: fix crash when rune is completely bogus.
The error routine returns a string literal in this case, which we can't take(). Reported-by: @jb55 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
neil saitug
parent
43e5ef3cc4
commit
aaf743e438
@@ -2559,6 +2559,14 @@ def test_commando(node_factory, executor):
|
||||
fut.result(10)
|
||||
|
||||
rune = l1.rpc.commando_rune()['rune']
|
||||
|
||||
# Bad rune fails
|
||||
with pytest.raises(RpcError, match="Not authorized: Not derived from master"):
|
||||
l2.rpc.call(method='commando',
|
||||
payload={'peer_id': l1.info['id'],
|
||||
'rune': 'VXY4AAkrPyH2vzSvOHnI7PDVfS6O04bRQLUCIUFJD5Y9NjQmbWV0aG9kPWludm9pY2UmcmF0ZT0yMZ==',
|
||||
'method': 'listpeers'})
|
||||
|
||||
# This works
|
||||
res = l2.rpc.call(method='commando',
|
||||
payload={'peer_id': l1.info['id'],
|
||||
|
||||
Reference in New Issue
Block a user