From d9b99d059977504368d6cfe7547dbaaaa12a0fc2 Mon Sep 17 00:00:00 2001 From: U-Zyn Chua Date: Tue, 6 Aug 2013 15:19:59 +0800 Subject: [PATCH] Fixes a bug where server would not run when there are spaces in documentRoot. --- lib/Cake/Console/Command/ServerShell.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Cake/Console/Command/ServerShell.php b/lib/Cake/Console/Command/ServerShell.php index b850a6d31..492b7d48b 100644 --- a/lib/Cake/Console/Command/ServerShell.php +++ b/lib/Cake/Console/Command/ServerShell.php @@ -129,8 +129,8 @@ class ServerShell extends AppShell { $command = sprintf("php -S %s:%d -t %s %s", $this->_host, $this->_port, - $this->_documentRoot, - $this->_documentRoot . '/index.php' + escapeshellarg($this->_documentRoot), + escapeshellarg($this->_documentRoot . '/index.php') ); $port = ($this->_port == self::DEFAULT_PORT) ? '' : ':' . $this->_port;