Skip to content

Commit d0ede96

Browse files
committed
feat: use library for decoding of payload
1 parent 231828b commit d0ede96

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Storefront/Framework/AltchaCaptcha.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@ public function isValid(Request $request, array $captchaConfig): bool
4444
}
4545

4646
try {
47-
$decodedPayload = \base64_decode($verifyData, true);
48-
$payload = \json_decode($decodedPayload, true, 512, \JSON_THROW_ON_ERROR);
49-
50-
return (new Altcha($secretKey))->verifySolution($payload);
47+
return (new Altcha($secretKey))->verifySolution($verifyData);
5148
} catch (\Throwable) {
5249
return false;
5350
}

0 commit comments

Comments
 (0)