Skip to content

Commit 861e99e

Browse files
committed
MAGETWO-42038: RCE/DOS via cron.php
- Fixed the issue of running the cron without any group (it was showing the error message that you can't run it from cli - which is wrong).
1 parent b2bc4d0 commit 861e99e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pub/cron.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212
require dirname(__DIR__) . '/app/bootstrap.php';
1313

14-
if ($_GET){
15-
$opt = $_GET;
16-
} else {
14+
if (php_sapi_name() === 'cli'){
1715
echo "You cannot run this from the command line." . PHP_EOL .
1816
"Run \"php bin/magento cron:run\" instead." . PHP_EOL;
1917
exit(1);
18+
} else {
19+
$opt = $_GET;
2020
}
2121

2222
try {

0 commit comments

Comments
 (0)