magento / security-package

Magento Security Extensions
Open Software License 3.0
73 stars 69 forks source link

Data not saved on failed attempts #27

Closed AurelienLavorel closed 4 years ago

AurelienLavorel commented 5 years ago

Data not saved on failed attempts

Preconditions

  1. Magento 2.2.5
  2. msp/recaptcha 2.0.2

Steps to reproduce

  1. Enable module with key on contact page
  2. Fill form without click on google captcha
  3. Send it

Expected result

  1. I got an error
  2. I got my data pre-filled

Actual result

  1. I got and error
  2. I loose my data

On Magento captcha code, it's here: https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Captcha/Observer/CheckContactUsFormObserver.php#L80

We should have the same behavior on that class: https://github.com/magento/magespecialist_ReCaptcha/blob/2.3-develop/Observer/ReCaptchaObserver.php#L94

I don't understand where MSP\ReCaptcha\Observer\Frontend\ContactFormObserver is generated so I can't make the pull request by myself :(

jamie-selesti commented 5 years ago

I agree I believe some method of data persisting

taoufiqaitali commented 5 years ago

same issue in create account form

create post have this function $this->session->setCustomerFormData($this->getRequest()->getPostValue());

phoenix128 commented 5 years ago

Not sure this is possible since the current implementation of MSP reCaptcha stops any kind of input before the controller is executed. I will investigate on it.

frithjof commented 5 years ago

any news on this?

sdzhepa commented 4 years ago

Due to significant refactoring and UI changes in Admin Panel for reCAPCTHA module in the scope of security-package for 2.4.x release, this bug is not actual anymore.