Skip to content

Commit

Permalink
ensure recaptcha.siteKey is assigned in the controller
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed May 28, 2024
1 parent ba7eff6 commit cc41526
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/material/themes/material/core/loginuserpass.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function preventDefault(event) {
</script>

<?php
$siteKey = htmlentities($this->data['recaptcha.siteKey'] ?? null);
$siteKey = htmlentities($this->data['recaptcha.siteKey']);

if (! empty($siteKey)) {
?>
Expand Down
2 changes: 2 additions & 0 deletions modules/silauth/www/loginuserpass.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@
$request = new Request();
if (Authenticator::isCaptchaRequired($username, $request->getUntrustedIpAddresses())) {
$t->data['recaptcha.siteKey'] = $recaptchaSiteKey;
} else {
$t->data['recaptcha.siteKey'] = null;
}

if (isset($state['SPMetadata'])) {
Expand Down

0 comments on commit cc41526

Please sign in to comment.