fix: reject aliased ids in allowance owner and delegating spender - #26794
Open
ibankov wants to merge 1 commit into
Open
fix: reject aliased ids in allowance owner and delegating spender#26794ibankov wants to merge 1 commit into
ibankov wants to merge 1 commit into
Conversation
Signed-off-by: Ivan Bankov <ivan.bankov@limechain.tech>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #26794 +/- ##
=========================================
Coverage 70.49% 70.49%
- Complexity 11670 11675 +5
=========================================
Files 2583 2583
Lines 108296 108301 +5
Branches 12107 12109 +2
=========================================
+ Hits 76342 76352 +10
+ Misses 27977 27975 -2
+ Partials 3977 3974 -3
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
✅ All tests passed ✅🏷️ Commit: 11e98fd Learn more about TestLens at testlens.app. |
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.
Description:
Allowance transactions resolve account ids by number, so an
AccountIDcarrying an alias names no account and should be rejected rather than read as an absent field.getEffectiveOwnernow falls back to the payer only when the owner is absent (nullorAccountID.DEFAULT) or names the payer. An aliased or zero-numbered owner fails withINVALID_ALLOWANCE_OWNER_ID.isDelegatingSpenderPresentno longer reads an id as a number unconditionally, so an aliaseddelegating_spenderfails withINVALID_DELEGATING_SPENDER.CryptoApproveAllowanceHandler's private copy of the owner check shares one predicate with the validator, comparing full account ids instead of account numbers alone.