cosmos-sdk/client
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
..
debug LGTM alerts audit (#7440) 2020-10-02 15:13:58 +02:00
docs Async Ack Fixes (#7735) 2020-11-02 15:13:48 +00:00
flags Merge PR #7485: keyring-dir flag 2020-10-08 13:41:35 -04:00
grpc/reflection Add GetTx gRPC endpoint (#7688) 2020-10-30 12:32:02 +00:00
input client/keys: make add command's output parseable (#6603) 2020-07-05 13:22:49 +02:00
keys Remove duplicate print message on keys add command (#7654) 2020-10-24 05:17:07 +00:00
rest Add Deprecation headers for legacy rest endpoints (#7686) 2020-10-29 11:37:46 +00:00
rpc tm: update to latest (#7376) 2020-09-23 13:44:40 +00:00
tx Add GetTx gRPC endpoint (#7688) 2020-10-30 12:32:02 +00:00
account_retriever.go client: add GetAccount and GetAccountWithHeight to AccountRetriever (#7558) 2020-10-15 14:19:57 +00:00
broadcast.go tm: update to latest (#7376) 2020-09-23 13:44:40 +00:00
broadcast_test.go tm: update to latest (#7376) 2020-09-23 13:44:40 +00:00
cmd.go Fix panic in context when setting nodeURI (#7699) 2020-10-28 13:31:22 +00:00
cmd_test.go Merge PR #7485: keyring-dir flag 2020-10-08 13:41:35 -04:00
context.go Fix panic in context when setting nodeURI (#7699) 2020-10-28 13:31:22 +00:00
context_test.go Add ADR 031 BaseApp and codec infrastructure (#7519) 2020-10-15 13:07:59 +00:00
errors.go
grpc_query.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
grpc_query_test.go Add ADR 031 BaseApp and codec infrastructure (#7519) 2020-10-15 13:07:59 +00:00
query.go Use any as validator pubkey (#7597) 2020-10-23 12:07:52 +00:00
test_helpers.go client: add GetAccount and GetAccountWithHeight to AccountRetriever (#7558) 2020-10-15 14:19:57 +00:00
tx_config.go Migrate {x/auth, x/gov, x/staking} missing CLI queries to proto (#6994) 2020-09-10 18:26:47 +00:00
utils.go add page flag for CLI queries (#6824) 2020-07-24 08:17:11 +00:00
utils_test.go