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: add non-zero check of nextTokenID.Id for genesis (backport #1276) #1282

Merged
merged 5 commits into from
Mar 19, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Mar 15, 2024

Description

  • (audit issue) This eliminates potential risk for Insufficient Sanity Check of tokenID in Genesis

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

This is an automatic backport of pull request #1276 done by [Mergify](https://mergify.com).

* fix: add non-zero check of nextTokenID.Id for genesis

* chore: add testcase

* chore: update changelog

* chore: move validation logic to validate function

* chore: add testcase

(cherry picked from commit 47a5e9f)

# Conflicts:
#	CHANGELOG.md
Copy link
Contributor Author

mergify bot commented Mar 15, 2024

Cherry-pick of 47a5e9f has failed:

On branch mergify/bp/release/v0.48.x/pr-1276
Your branch is up to date with 'origin/release/v0.48.x'.

You are currently cherry-picking commit 47a5e9fec.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   x/collection/genesis.go
	modified:   x/collection/genesis_test.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   CHANGELOG.md

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@jaeseung-bae jaeseung-bae self-assigned this Mar 15, 2024
Copy link

codecov bot commented Mar 15, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 69.78%. Comparing base (6efd17d) to head (bdf2ba0).

Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                 @@
##           release/v0.48.x    #1282      +/-   ##
===================================================
- Coverage            69.78%   69.78%   -0.01%     
===================================================
  Files                  646      646              
  Lines                67503    67506       +3     
===================================================
  Hits                 47108    47108              
- Misses               18209    18212       +3     
  Partials              2186     2186              
Files Coverage Δ
x/collection/genesis.go 91.51% <80.00%> (-1.70%) ⬇️

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
jaeseung-bae and others added 2 commits March 15, 2024 20:59
Co-authored-by: 170210 <85928898+170210@users.noreply.github.com>
0Tech
0Tech previously approved these changes Mar 15, 2024
@0Tech 0Tech added A: bug Something isn't working C:x/collection and removed conflicts labels Mar 15, 2024
@jaeseung-bae jaeseung-bae requested a review from 0Tech March 19, 2024 04:46
@jaeseung-bae jaeseung-bae merged commit 8b312a6 into release/v0.48.x Mar 19, 2024
29 checks passed
@jaeseung-bae jaeseung-bae deleted the mergify/bp/release/v0.48.x/pr-1276 branch March 19, 2024 08:13
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/collection
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants