Finschia / finschia-sdk

A framework for building blockchains based Finschia Mainnet that is forked from cosmos-sdk
Apache License 2.0
63 stars 30 forks source link

Compare the signer of the normal message and the signer of MsgExcute #1291

Closed Mdaiki0730 closed 4 months ago

Mdaiki0730 commented 4 months ago

Description

Currently, msgs signer validation is not performed when dispatching msgs of MsgExcute. This leads to serious problems such as fraudulent transfers.

This can be prevented by making sure that the signer of the msg executed when dispatching msg is the signer of MsgExcute. We will have to discuss later whether this modification is sufficient.

Motivation and context

How has this been tested?

Screenshots (if appropriate):

Checklist:

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

:exclamation: No coverage uploaded for pull request base (feat/zkauth@0b5b207). Click here to learn what that means.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1291/graphs/tree.svg?width=650&height=150&src=pr&token=m16qfzIPO7&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia)](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1291?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia) ```diff @@ Coverage Diff @@ ## feat/zkauth #1291 +/- ## ============================================== Coverage ? 69.57% ============================================== Files ? 659 Lines ? 68385 Branches ? 0 ============================================== Hits ? 47577 Misses ? 18553 Partials ? 2255 ``` | [Files](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1291?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia) | Coverage Δ | | |---|---|---| | [x/zkauth/keeper/keeper.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1291?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-eC96a2F1dGgva2VlcGVyL2tlZXBlci5nbw==) | `67.44% <100.00%> (ø)` | | | [x/zkauth/keeper/msg\_server.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1291?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-eC96a2F1dGgva2VlcGVyL21zZ19zZXJ2ZXIuZ28=) | `62.50% <100.00%> (ø)` | |