mirror of
https://github.com/aljazceru/plugins.git
synced 2025-12-29 02:44:20 +01:00
commando: limit total request size.
1MB normally, but 10MB if you have a cached rune. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -316,3 +316,10 @@ def test_megacmd(node_factory):
|
||||
'method': 'get' + 'x' * 130000,
|
||||
'rune': rrune,
|
||||
'params': {}})
|
||||
|
||||
with pytest.raises(RpcError, match='Command too long'):
|
||||
l1.rpc.call(method='commando',
|
||||
payload={'peer_id': l2.info['id'],
|
||||
'method': 'get' + 'x' * 1100000,
|
||||
'rune': rrune,
|
||||
'params': {}})
|
||||
|
||||
Reference in New Issue
Block a user