Description
processRewardClaim in src/modules/rewards/reward.service.ts:27-80 doesn't check that the score meets the passing threshold. It uses the score parameter directly from the retry job without validating that the quiz was actually passed.
If the retry queue receives a job for a non-passing submission (e.g., due to a bug or manual queue manipulation), the reward will be processed.
Impact
Bypass of the passing requirement for reward claims via the retry path.
File
src/modules/rewards/reward.service.ts:27-80
Suggested Fix
Add a check that score >= passing threshold (70%) before processing the reward claim in the retry path.
Description
processRewardClaiminsrc/modules/rewards/reward.service.ts:27-80doesn't check that the score meets the passing threshold. It uses thescoreparameter directly from the retry job without validating that the quiz was actually passed.If the retry queue receives a job for a non-passing submission (e.g., due to a bug or manual queue manipulation), the reward will be processed.
Impact
Bypass of the passing requirement for reward claims via the retry path.
File
src/modules/rewards/reward.service.ts:27-80Suggested Fix
Add a check that
score >= passing threshold(70%) before processing the reward claim in the retry path.