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

imp(statemachine)!: check length of unbounded string fields in messages #4992

Merged
merged 13 commits into from
Oct 31, 2023

Conversation

crodriguezvega
Copy link
Contributor

Description

closes: #4859

Co-authored-by: Jacob Gadikian [email protected]

Commit Message / Changelog Entry

imp(statemachine)!: add length validation of string fields in messages

see the guidelines for commit messages. (view raw markdown for examples)


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md).
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/).
  • Added relevant godoc comments.
  • Provide a commit message to be used for the changelog entry in the PR description for review.
  • Re-reviewed Files changed in the Github PR explorer.
  • Review Codecov Report in the comment section below once CI passes.

Carlos Rodriguez and others added 8 commits October 15, 2023 23:56
…gRegisterCounterpartyPayee` (#4870)

* add check for length of counterparty payee in MsgRegisterCounterpartyPayee

* change test value
* add length validation of receiver address in msg transfer

* fix test.  Next will add a test case that ensures that >2kb is rejected.

* correct length of receiver address

* lint

* tidy

* remove unused const / add test for recipient address length check

* go mod tidy

* Update msgs.go

* rename variable

* use testing value

* fix package

* lint

---------

Co-authored-by: Du Nguyen <[email protected]>
Co-authored-by: Carlos Rodriguez <[email protected]>
@crodriguezvega crodriguezvega linked an issue Oct 30, 2023 that may be closed by this pull request
3 tasks
@crodriguezvega crodriguezvega changed the title imp: check length of unbounded string fields in messages imp(statemachine)!: check length of unbounded string fields in messages Oct 30, 2023
modules/apps/29-fee/types/msgs.go Outdated Show resolved Hide resolved
modules/apps/transfer/types/msgs.go Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Oct 31, 2023

Codecov Report

Merging #4992 (98f61e5) into main (50ac22e) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4992      +/-   ##
==========================================
+ Coverage   79.57%   79.59%   +0.02%     
==========================================
  Files         189      189              
  Lines       13241    13256      +15     
==========================================
+ Hits        10536    10551      +15     
  Misses       2284     2284              
  Partials      421      421              
Files Coverage Δ
...ps/27-interchain-accounts/controller/types/msgs.go 94.02% <100.00%> (+0.58%) ⬆️
modules/apps/29-fee/types/msgs.go 92.30% <100.00%> (+0.22%) ⬆️
modules/apps/transfer/types/msgs.go 96.61% <100.00%> (+0.38%) ⬆️

@crodriguezvega crodriguezvega merged commit ac5b2ca into main Oct 31, 2023
59 of 60 checks passed
@crodriguezvega crodriguezvega deleted the carlos/4859-unbounded-field-lengths branch October 31, 2023 13:13
@snobbee
Copy link

snobbee commented Nov 7, 2023

@crodriguezvega any plan for back porting this to v4.5.x? thanks

@crodriguezvega crodriguezvega mentioned this pull request Jun 18, 2024
3 tasks
crodriguezvega pushed a commit that referenced this pull request Jun 18, 2024
crodriguezvega pushed a commit that referenced this pull request Jun 19, 2024
* chore: backport #4992 to release/v7.6.x

* changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unbounded field lengths
7 participants