Avoid revert caused by slice overflow in WebAuthn.verify#6329
Avoid revert caused by slice overflow in WebAuthn.verify#6329ernestognw merged 3 commits intoOpenZeppelin:masterfrom
Conversation
🦋 Changeset detectedLatest commit: db9d2de The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughA changeset declares a minor version bump for openzeppelin-solidity with a fix to WebAuthn.sol. The verify function previously could revert instead of returning false during challenge validation. The fix implements bounds-safe string extraction and comparison using utility libraries, checking clientDataJSON length before accessing the expected challenge slice. Supporting test changes include a new testVerifyIndexOutOfBounds case and new overloads for the _runVerify helper to parameterize challengeIndex and typeIndex values. Suggested labels
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
8b63528 to
34cabc8
Compare
34cabc8 to
db9d2de
Compare
Co-authored-by: ernestognw <ernestognw@gmail.com> Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Fixes issue L01 in 5.6 audit.
PR Checklist
npx changeset add)