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

[Access] Validate addresses match network in rest api #4930

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

peterargue
Copy link
Contributor

Closes: #4928

Add check in REST API when parsing addresses that the address is both well formed hex and valid for the network the node is running on.

@peterargue peterargue self-assigned this Nov 3, 2023
@codecov-commenter
Copy link

codecov-commenter commented Nov 3, 2023

Codecov Report

Attention: 12 lines in your changes are missing coverage. Please review.

Comparison is base (18134c5) 55.77% compared to head (d2d53b6) 55.77%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4930      +/-   ##
==========================================
- Coverage   55.77%   55.77%   -0.01%     
==========================================
  Files         953      953              
  Lines       88420    88436      +16     
==========================================
+ Hits        49317    49325       +8     
- Misses      35398    35402       +4     
- Partials     3705     3709       +4     
Flag Coverage Δ
unittests 55.77% <61.29%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
engine/access/rest/request/address.go 100.00% <100.00%> (ø)
engine/access/rest/request/proposal_key.go 100.00% <100.00%> (ø)
engine/access/rest/request/signatures.go 96.15% <100.00%> (ø)
engine/access/rest/request/transaction.go 65.26% <100.00%> (ø)
engine/access/rest/request/get_account.go 75.00% <66.66%> (-3.27%) ⬇️
engine/access/rest/request/get_account_key.go 76.66% <50.00%> (-2.65%) ⬇️
engine/common/rpc/convert/validate.go 7.69% <0.00%> (-1.84%) ⬇️

... and 10 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@Guitarheroua Guitarheroua left a comment

Choose a reason for hiding this comment

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

Looks good for me.

@peterargue peterargue added this pull request to the merge queue Nov 7, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 7, 2023
@peterargue peterargue added this pull request to the merge queue Nov 7, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 7, 2023
@peterargue peterargue added this pull request to the merge queue Nov 7, 2023
Merged via the queue into master with commit d13d4be Nov 7, 2023
36 checks passed
@peterargue peterargue deleted the petera/4928-rest-address-validation branch November 7, 2023 17:37
peterargue added a commit that referenced this pull request Nov 14, 2023
[Access] Validate addresses match network in rest api
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Access] rest GetAccount using local data doesn't validate address matches chain
4 participants