add _validateExtParams#165
Open
koo-virtuals wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Medium Risk
Adds stricter
extParamsvalidation toBondingV5.preLaunch, which will now revert for non-canonical/misaligned or longer-than-32-byte payloads, potentially affecting existing integrators that sent loose encodings. Logic is simple but sits on the token-creation path and changes accepted input semantics.Overview
BondingV5
preLaunchnow validatesextParamsup front via a new_validateExtParams, enforcing a strict versioned layout: only empty payloads (V0) or exactly 32 bytes (V1) are accepted, lengths must be 32-byte aligned, and the first word must be a canonical bool (0/1); anything else reverts withInvalidInput._decodeIsFeeDelegationis simplified to assume prior validation and just read the first word, and the test suite is expanded to assert acceptance for V0/V1 while rejecting misaligned lengths, non-canonical bool words (including an ASCII "0x00.." attack payload), and unknown longer versions (64/96 bytes), plus preservingisFeeDelegationbehavior acrosslaunchauthorization.Reviewed by Cursor Bugbot for commit 846f720. Bugbot is set up for automated code reviews on this repo. Configure here.