Skip to content

Commit

Permalink
Polish up implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
orlangur authored and gelanivishal committed Jul 25, 2018
1 parent 727503d commit 38e2133
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,7 @@ public function __construct(\Magento\Framework\Data\Form\FormKey $formKey)
public function validate(\Magento\Framework\App\RequestInterface $request)
{
$formKey = $request->getParam('form_key', null);

if (!$formKey) {
return false;
}

return Security::compareStrings($formKey, $this->_formKey->getFormKey());

return $formKey && Security::compareStrings($formKey, $this->_formKey->getFormKey());
}
}

0 comments on commit 38e2133

Please sign in to comment.