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

fix: check multisig key list to prevent unexpected key deletion #737

Merged
merged 11 commits into from
Oct 21, 2022

Conversation

tkxkd0159
Copy link
Member

@tkxkd0159 tkxkd0159 commented Oct 18, 2022

add verifyMultisigTarget

Description

closes: #717

Motivation and context

How has this been tested?

Test by CLI with the audit scenario.

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

@tkxkd0159 tkxkd0159 added the A: bug Something isn't working label Oct 18, 2022
@tkxkd0159 tkxkd0159 self-assigned this Oct 18, 2022
@codecov
Copy link

codecov bot commented Oct 18, 2022

Codecov Report

Merging #737 (f5683ee) into main (da194c7) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #737      +/-   ##
==========================================
- Coverage   62.08%   62.05%   -0.04%     
==========================================
  Files         877      877              
  Lines       98970    98964       -6     
==========================================
- Hits        61450    61414      -36     
- Misses      33900    33933      +33     
+ Partials     3620     3617       -3     
Impacted Files Coverage Δ
client/keys/add.go 70.00% <100.00%> (+3.48%) ⬆️
x/token/validation.go 70.90% <0.00%> (-16.37%) ⬇️
x/token/msgs.go 30.96% <0.00%> (-5.59%) ⬇️
crypto/keys/internal/ecdsa/privkey.go 82.45% <0.00%> (-1.76%) ⬇️
x/collection/msgs.go 41.29% <0.00%> (-1.67%) ⬇️
x/foundation/genesis.go 83.21% <0.00%> (-0.46%) ⬇️
x/foundation/keeper/genesis.go 96.77% <0.00%> (-0.41%) ⬇️
x/wasm/keeper/keeper.go 85.80% <0.00%> (-0.37%) ⬇️
x/foundation/keeper/member.go 95.00% <0.00%> (-0.21%) ⬇️
x/foundation/client/testutil/suite.go 97.68% <0.00%> (-0.17%) ⬇️
... and 3 more

Copy link
Contributor

@loin3 loin3 left a comment

Choose a reason for hiding this comment

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

This PR does not seem to implement second recommended check Check if the Multisig contains the same name that will be overridden, and return an error to remind the users of trying a different name..

client/keys/add.go Show resolved Hide resolved
@tkxkd0159 tkxkd0159 requested a review from loin3 October 19, 2022 08:02
@tkxkd0159 tkxkd0159 marked this pull request as draft October 19, 2022 09:40
@tkxkd0159 tkxkd0159 marked this pull request as ready for review October 19, 2022 13:11
client/keys/add.go Outdated Show resolved Hide resolved
@tkxkd0159 tkxkd0159 requested a review from zemyblue October 21, 2022 03:50
@tkxkd0159 tkxkd0159 requested a review from zemyblue October 21, 2022 05:10
@tkxkd0159 tkxkd0159 merged commit 1e53873 into Finschia:main Oct 21, 2022
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Key Could Possibly Be Deleted with AddKeyCommand()
3 participants