Looking at the bug fix "APPSEC-1755: Anti-CSRF form_key is not changed after login" here https://magento.com/security/patches/magento-2016-and-219-security-update , it seems that since the form key is now changed after the login, the form key used for the Wishlist in vendor/magento/module-wishlist/Controller/Index/Add.php does not validate at the beginning of the execute function.
public function execute()
{
/** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */
$resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
if (!$this->formKeyValidator->validate($this->getRequest())) {
return $resultRedirect->setPath('*/');
}
@carloricci84, thank you for your report.
We've created internal ticket(s) MAGETWO-82985 to track progress on the issue.
I am working on it at #mm17es
The issue has been fixed and delivered to 2.1-develop, 2.2-develop and 2.3-develop branches. Will be available with upcoming patch release
Are we sure this is fixed in 2.2.2? I am seeing this exact same bug. If you go through the login form, the form_key changes and when module-wishlist/Controller/Index/Add.php::execute() runs it fails at the $this->formKeyValidator->validate($this->getRequest()) line, just as described.
Hi @thaddeusmt I tested with branch 2.2-develop with sample data and works fine.
This issue will be added to 2.2.4
I am facing issue with magento 2.2.2 wishlist. Item are not added in wishlist if user logged out.
Here are the steps with sample data
Steps to reproduce.



There is one more issue in wishlist.
If user have some item in their wishlist it should highlight on that item page/category page, but it not.



Please provide way to solve it.
Hi @lalit-algoworks this issue will be fixed in 2.2.4
Magento support gave us a patch for 2.2.2, so perhaps it will be fixed in 2.2.3+
can you share me the patch
not work, add item wishlist magento 2.3 Invalid Form Key,
Most helpful comment
magento_2.2.2_add-to-wishlist-login-register_patch.txt