go-ethereum/rpc
Matus Kysel b135da2eac
rpc: add method name length limit (#31711)
This change adds a limit for RPC method names to prevent potential abuse
where large method names could lead to large response sizes.

The limit is enforced in:
- handleCall for regular RPC method calls
- handleSubscribe for subscription method calls

Added tests in websocket_test.go to verify the length limit
functionality for both regular method calls and subscriptions.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2025-05-05 14:43:47 +02:00
..
testdata
client.go rpc: add timeout to rpc client Unsubscribe (#30318) 2024-08-20 15:54:28 +02:00
client_example_test.go
client_opt.go
client_opt_test.go all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01:00
client_test.go rpc: run tests in parallel (#30384) 2024-11-19 13:43:33 +01:00
context_headers.go
doc.go
endpoints.go
errors.go
handler.go rpc: add method name length limit (#31711) 2025-05-05 14:43:47 +02:00
http.go
http_test.go rpc: run tests in parallel (#30384) 2024-11-19 13:43:33 +01:00
inproc.go
ipc.go
ipc_js.go
ipc_unix.go
ipc_wasip1.go all: add build tags for wasip1 (#31090) 2025-01-30 16:58:53 +01:00
ipc_windows.go
json.go rpc: add method name length limit (#31711) 2025-05-05 14:43:47 +02:00
metrics.go
server.go
server_test.go rpc: run tests in parallel (#30384) 2024-11-19 13:43:33 +01:00
service.go
stdio.go
subscription.go rpc: add timeout to rpc client Unsubscribe (#30318) 2024-08-20 15:54:28 +02:00
subscription_test.go rpc: run tests in parallel (#30384) 2024-11-19 13:43:33 +01:00
testservice_test.go
types.go eth, eth/filters: implement API error code for pruned blocks (#31361) 2025-04-01 13:42:01 +02:00
types_test.go rpc: run tests in parallel (#30384) 2024-11-19 13:43:33 +01:00
websocket.go
websocket_test.go rpc: add method name length limit (#31711) 2025-05-05 14:43:47 +02:00