Skip to content

Commit

Permalink
Fix hcaptcha config variable usage
Browse files Browse the repository at this point in the history
  • Loading branch information
paddy01 authored Oct 3, 2024
1 parent 688a7e9 commit 319c141
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/captcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ private function validate_hcaptcha($requester) {
'method' => 'POST',
'content' => http_build_query(
array(
'secret' => $config['secret'],
'secret' => $this->config['secret'],
'response' => $_POST['h-captcha-response'],
'remoteip' => $requester
)
Expand All @@ -52,7 +52,7 @@ private function validate_hcaptcha($requester) {
);

$context = stream_context_create($options);
$output = file_get_contents($config['url'], false, $context);
$output = file_get_contents($this->config['url'], false, $context);
$captcha = json_decode($output, true);

return $captcha["success"] == true;
Expand Down

0 comments on commit 319c141

Please sign in to comment.