Skip to content
Permalink
Browse files Browse the repository at this point in the history
Merge pull request from GHSA-frf2-c9q3-qg9m
Make sure the user is connected before submit reorder
  • Loading branch information
PierreRambaud committed Nov 16, 2020
2 parents 69f840d + 3afc5a6 commit 709d9af
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion controllers/front/OrderController.php
Expand Up @@ -58,7 +58,10 @@ public function postProcess()
{
parent::postProcess();

if (Tools::isSubmit('submitReorder') && $id_order = (int) Tools::getValue('id_order')) {
if (Tools::isSubmit('submitReorder')
&& $this->context->customer->isLogged()
&& $id_order = (int) Tools::getValue('id_order')
) {
$oldCart = new Cart(Order::getCartIdStatic($id_order, $this->context->customer->id));
$duplication = $oldCart->duplicate();
if (!$duplication || !Validate::isLoadedObject($duplication['cart'])) {
Expand Down

0 comments on commit 709d9af

Please sign in to comment.