Skip to content

Commit 0c32aa7

Browse files
committed
security-package/issues/21: reCaptcha is added multiple times to head
1 parent 3fb4275 commit 0c32aa7

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

ReCaptchaCustomer/Observer/AjaxLoginObserver.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ public function execute(Observer $observer): void
101101
$controller = $observer->getControllerAction();
102102
$request = $controller->getRequest();
103103
$response = $controller->getResponse();
104-
105104
$validationConfig = $this->validationConfigResolver->get($key);
106105

107106
try {

ReCaptchaUser/view/adminhtml/templates/recaptcha.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@ $isInvisible = !empty($config['invisible']);
3131
let token = '';
3232

3333
this.widgetId = grecaptcha.render('admin-recaptcha', {
34-
<?php foreach($renderingOptions as $key => $value):?>
34+
<?php foreach($renderingOptions as $key => $value): ?>
3535
'<?= $block->escapeJs($key) ?>': '<?= $block->escapeJs($value) ?>',
3636
<?php endforeach; ?>
3737
'callback': function (token) { // jscs:ignore jsDoc
38-
<?php if ($isInvisible) : ?>
38+
<?php if ($isInvisible): ?>
3939
this.token = token;
4040
$('#login-form').submit();
4141
<?php endif; ?>
4242
}.bind(this)
4343
});
4444

45-
<?php if ($isInvisible) : ?>
45+
<?php if ($isInvisible): ?>
4646
$('#login-form').submit(function (event) {
4747
if (!this.token) {
4848
event.preventDefault(event);

0 commit comments

Comments
 (0)