cosmos-sdk/baseapp
Emmanuel T Odeke 9f17bc77af
baseapp, client: reject gRPC connections with out-of-range/nefarious x-cosmos-block-height values (#7663)
* baseapp, client: reject gRPC connections with out-of-range/nefarious x-cosmos-block-height values

Rejects gRPC connections that send out-of-range x-cosmos-block-height
values that previously weren't checked for. We now reject any negative
values and any value greater than max(int64) aka >9223372036854775807.

Also added an enforcement for returning an error if any negative heights
are passed into (*BaseApp).createQueryContext.

Fixes #7662

* baseapp, client: reject gRPC connections with out-of-range/nefarious x-cosmos-block-height values

Rejects gRPC connections that send out-of-range x-cosmos-block-height
values that previously weren't checked for. We now reject any negative
values and any value greater than max(int64) aka >9223372036854775807.

Also added an enforcement for returning an error if any negative heights
are passed into (*BaseApp).createQueryContext.

Fixes #7662

* Address Robert's feedback to extract negative height checker

* Fix tests

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-03 18:35:22 +00:00
..
abci_test.go baseapp, client: reject gRPC connections with out-of-range/nefarious x-cosmos-block-height values (#7663) 2020-11-03 18:35:22 +00:00
abci.go baseapp, client: reject gRPC connections with out-of-range/nefarious x-cosmos-block-height values (#7663) 2020-11-03 18:35:22 +00:00
baseapp_test.go Handle nil *Any in UnpackAny and add panic handler for tx decoding (#7594) 2020-10-19 18:04:44 +00:00
baseapp.go Handle nil *Any in UnpackAny and add panic handler for tx decoding (#7594) 2020-10-19 18:04:44 +00:00
grpcrouter_helpers.go Throw an error on duplicate registration (#7729) 2020-10-29 15:32:47 +00:00
grpcrouter_test.go Throw an error on duplicate registration (#7729) 2020-10-29 15:32:47 +00:00
grpcrouter.go Add GetTx gRPC endpoint (#7688) 2020-10-30 12:32:02 +00:00
grpcserver.go baseapp, client: reject gRPC connections with out-of-range/nefarious x-cosmos-block-height values (#7663) 2020-11-03 18:35:22 +00:00
msg_service_router_test.go Throw an error on duplicate registration (#7729) 2020-10-29 15:32:47 +00:00
msg_service_router.go Throw an error on duplicate registration (#7729) 2020-10-29 15:32:47 +00:00
options.go Add ADR 031 BaseApp and codec infrastructure (#7519) 2020-10-15 13:07:59 +00:00
params_test.go tendermint: update sdk to rc5 (#7527) 2020-10-14 06:20:52 +00:00
params.go tendermint: update sdk to rc5 (#7527) 2020-10-14 06:20:52 +00:00
queryrouter_test.go Merge PR #5421: Refactor Error Handling 2019-12-27 12:57:54 -05:00
queryrouter.go x/ibc: alter id requirements (#6227) 2020-05-15 17:24:31 +00:00
recovery_test.go Baseapp recovery middleware (#6053) 2020-06-05 16:48:18 +00:00
recovery.go Baseapp recovery middleware (#6053) 2020-06-05 16:48:18 +00:00
router_test.go Concept PR simplify Module (#6231) 2020-06-10 18:48:16 +00:00
router.go module: pass route by value (#6404) 2020-06-11 15:37:23 +00:00
state.go Merge PR #4748: Write-Through Inter-Block Cache 2019-09-04 13:33:32 -04:00
test_helpers.go Handle nil *Any in UnpackAny and add panic handler for tx decoding (#7594) 2020-10-19 18:04:44 +00:00