Skip to content

Commit 11a95d6

Browse files
orlangurgelanivishal
authored andcommitted
Polish up implementation
1 parent 6e1beda commit 11a95d6

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/internal/Magento/Framework/Data/Form/FormKey/Validator.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,7 @@ public function __construct(\Magento\Framework\Data\Form\FormKey $formKey)
3434
public function validate(\Magento\Framework\App\RequestInterface $request)
3535
{
3636
$formKey = $request->getParam('form_key', null);
37-
38-
if (!$formKey) {
39-
return false;
40-
}
41-
42-
return Security::compareStrings($formKey, $this->_formKey->getFormKey());
37+
38+
return $formKey && Security::compareStrings($formKey, $this->_formKey->getFormKey());
4339
}
4440
}

0 commit comments

Comments
 (0)