Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Mar 25, 2024

Conversation

Mdaiki0730
Copy link
Member

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:

  • I followed the contributing guidelines and code of conduct.
  • I have added a relevant changelog to CHANGELOG.md
  • I have added tests to cover my changes.
  • I have updated the documentation accordingly.
  • I have updated API documentation client/docs/swagger-ui/swagger.yaml

@Mdaiki0730 Mdaiki0730 marked this pull request as ready for review March 22, 2024 03:11
Copy link

codecov bot commented Mar 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ 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

@@              Coverage Diff               @@
##             feat/zkauth    #1291   +/-   ##
==============================================
  Coverage               ?   69.57%           
==============================================
  Files                  ?      659           
  Lines                  ?    68385           
  Branches               ?        0           
==============================================
  Hits                   ?    47577           
  Misses                 ?    18553           
  Partials               ?     2255           
Files Coverage Δ
x/zkauth/keeper/keeper.go 67.44% <100.00%> (ø)
x/zkauth/keeper/msg_server.go 62.50% <100.00%> (ø)

Copy link
Member

@ulbqb ulbqb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about adding a test case with the wrong zk signer?

@Mdaiki0730 Mdaiki0730 requested a review from ulbqb March 25, 2024 06:24
Copy link
Contributor

@shiki-tak shiki-tak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Mdaiki0730 Mdaiki0730 merged commit d5b83de into feat/zkauth Mar 25, 2024
30 checks passed
@Mdaiki0730 Mdaiki0730 deleted the feat/signer-check branch March 25, 2024 06:42
@Mdaiki0730 Mdaiki0730 restored the feat/signer-check branch March 25, 2024 06:42
@Mdaiki0730 Mdaiki0730 deleted the feat/signer-check branch March 25, 2024 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: bug Something isn't working C:x/zkauth
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants