mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Merge pull request #8995 from kenjis/fix-command-loads-rewrite.php
fix: `command()` may execute `rewrite.php`
This commit is contained in:
commit
dd399029f6
@ -103,7 +103,7 @@ class Serve extends BaseCommand
|
||||
$docroot = escapeshellarg(FCPATH);
|
||||
|
||||
// Mimic Apache's mod_rewrite functionality with user settings.
|
||||
$rewrite = escapeshellarg(__DIR__ . '/rewrite.php');
|
||||
$rewrite = escapeshellarg(SYSTEMPATH . 'rewrite.php');
|
||||
|
||||
// Call PHP's built-in webserver, making sure to set our
|
||||
// base path to the public folder, and to use the rewrite file
|
||||
|
@ -21,11 +21,6 @@ declare(strict_types=1);
|
||||
*/
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
// Avoid this file run when listing commands
|
||||
if (PHP_SAPI === 'cli') {
|
||||
return;
|
||||
}
|
||||
|
||||
$uri = urldecode(
|
||||
parse_url('https://codeigniter.com' . $_SERVER['REQUEST_URI'], PHP_URL_PATH) ?? ''
|
||||
);
|
Loading…
x
Reference in New Issue
Block a user