Skip to content

fix: secure verifyQuizProof to check hash against parameters#56

Closed
Glam26 wants to merge 2 commits into
ChainLearnOfficial:mainfrom
Glam26:fix-quiz-proof-verification
Closed

fix: secure verifyQuizProof to check hash against parameters#56
Glam26 wants to merge 2 commits into
ChainLearnOfficial:mainfrom
Glam26:fix-quiz-proof-verification

Conversation

@Glam26

@Glam26 Glam26 commented Jun 25, 2026

Copy link
Copy Markdown

To summarize, here is exactly what was completed:

  1. Removed the Timestamp: The non-deterministic timestamp was removed from
    the createQuizProof function payload, allowing the hash to be reproduced
    accurately.
  2. Reconstructed and Verified Hash: Added logic to verifyQuizProof that
    reconstructs the hash from the given parameters ( userAddress , quizId ,
    score ) and strictly compares it against the provided hash before
    checking the signature. This prevents proofs from being reused across
    different users or quizzes.

closes #30

@DeFiVC

DeFiVC commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Why is a different account commiting in you PR?

@DeFiVC DeFiVC closed this Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[HIGH] verifyQuizProof ignores 3 of 5 parameters — proof reusable across users

3 participants