Skip to content

fix: avoid direct access to reviews list AJAX #33876

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 18, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update ListAjax.php
  • Loading branch information
Ilan Parmentier authored Aug 21, 2021
commit 4be563b5af2ad9ee93029efa8d9523d09cda13f7
6 changes: 4 additions & 2 deletions app/code/Magento/Review/Controller/Product/ListAjax.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ class ListAjax extends ProductController implements HttpGetActionInterface
*/
public function execute()
{
if (!$this->getRequest()->isAjax()
|| !$this->initProduct()) {
if (
!$this->getRequest()->isAjax() ||
!$this->initProduct()
) {
/** @var \Magento\Framework\Controller\Result\Forward $resultForward */
$resultForward = $this->resultFactory->create(ResultFactory::TYPE_FORWARD);
return $resultForward->forward('noroute');
Expand Down