Skip to content

Commit

Permalink
Fix renew password form turnstile error
Browse files Browse the repository at this point in the history
  • Loading branch information
magentix committed Feb 17, 2023
1 parent 1797cbb commit 45e7262
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.1.1

- Fix renew password form turnstile error

## 1.1.0

- Prestashop 8.0.0 compatibility
Expand Down
4 changes: 2 additions & 2 deletions pixel_cloudflare_turnstile.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Pixel_cloudflare_turnstile extends Module implements WidgetInterface
public function __construct()
{
$this->name = 'pixel_cloudflare_turnstile';
$this->version = '1.1.0';
$this->version = '1.1.1';
$this->author = 'Pixel Open';
$this->tab = 'front_office_features';
$this->need_instance = 0;
Expand Down Expand Up @@ -252,7 +252,7 @@ protected function canProcess(string $controllerClass, bool $validate = false):

// Reset Password
if ($controllerClass === 'PasswordController' && $this->isAvailable(self::FORM_PASSWORD)) {
if ($validate && empty($_POST)) {
if ($validate && (empty($_POST) || (isset($_POST['token'], $_POST['id_customer']) && !isset($_POST['email'])))) {
return false;
}
return true;
Expand Down

0 comments on commit 45e7262

Please sign in to comment.