Skip to content

Commit 9fb51f0

Browse files
mergify[bot]facundomedicajulienrbrt
authored andcommitted
fix: avoid broadcasting tx through query (backport cosmos#15044) (cosmos#15047)
Co-authored-by: Facundo Medica <[email protected]> Co-authored-by: Julien Robert <[email protected]>
1 parent 6cb128c commit 9fb51f0

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ Ref: https://keepachangelog.com/en/1.0.0/
3838

3939
## [Unreleased]
4040

41+
## [v0.46.10](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.10) - 2022-02-16
42+
4143
### Improvements
4244

4345
* (cli) [#14953](https://github.com/cosmos/cosmos-sdk/pull/14953) Enable profiling block replay during abci handshake with `--cpu-profile`.

RELEASE_NOTES.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
# Cosmos SDK v0.46.9 Release Notes
1+
# Cosmos SDK v0.46.10 Release Notes
22

3-
This release introduces bug fixes and improvements. Notably an extra config in the `app.toml`, `iavl-lazy-loading`, to enable lazy loading of IAVL store.
4-
Changes to be made in the `app.toml` can be found in the [CHANGELOG](https://github.com/cosmos/cosmos-sdk/blob/release/v0.46.x/CHANGELOG.md).
3+
This release improves CPU profiling when using the `--cpu-profile` flag, and fixes a possible way to DoS a node.
54

65
Please see the [CHANGELOG](https://github.com/cosmos/cosmos-sdk/blob/release/v0.46.x/CHANGELOG.md) for an exhaustive list of changes.
76

8-
Full Commit History: https://github.com/cosmos/cosmos-sdk/compare/v0.46.8...v0.46.9
7+
Full Commit History: https://github.com/cosmos/cosmos-sdk/compare/v0.46.9...v0.46.10

baseapp/abci.go

+4
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,10 @@ func (app *BaseApp) Query(_ context.Context, req *abci.QueryRequest) (resp *abci
503503
telemetry.IncrCounter(1, "query", req.Path)
504504
defer telemetry.MeasureSince(time.Now(), req.Path)
505505

506+
if req.Path == "/cosmos.tx.v1beta1.Service/BroadcastTx" {
507+
return sdkerrors.QueryResult(sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "can't route a broadcast tx message"), app.trace)
508+
}
509+
506510
// handle gRPC routes first rather than calling splitPath because '/' characters
507511
// are used as part of gRPC paths
508512
if grpcHandler := app.grpcQueryRouter.Route(req.Path); grpcHandler != nil {

0 commit comments

Comments
 (0)