Skip to content

Commit 0e8eaa1

Browse files
author
Maksym Aposov
committed
MAGETWO-41964: Log created on random requests - leads to DoS attack
1 parent c8c4a97 commit 0e8eaa1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/code/Magento/Store/Controller/Store/SwitchAction.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Magento\Framework\App\Action\Action;
1010
use Magento\Framework\App\Action\Context as ActionContext;
1111
use Magento\Framework\App\Http\Context as HttpContext;
12+
use Magento\Framework\Exception\NoSuchEntityException;
1213
use Magento\Store\Api\StoreCookieManagerInterface;
1314
use Magento\Store\Api\StoreRepositoryInterface;
1415
use Magento\Store\Model\Store;
@@ -78,7 +79,7 @@ public function execute()
7879
$store = $this->storeRepository->getActiveStoreByCode($storeCode);
7980
} catch (StoreIsInactiveException $e) {
8081
$error = __('Requested store is inactive');
81-
} catch (\InvalidArgumentException $e) {
82+
} catch (NoSuchEntityException $e) {
8283
$error = __('Requested store is not found');
8384
}
8485

0 commit comments

Comments
 (0)