diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-02-16 16:26:02 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-02-16 22:13:01 +0100 |
commit | 992164446cf7da39078d879300475b6353e1d40f (patch) | |
tree | 6df581f39b6c61cc2e0199c8411bd7b5d1e53648 /lib/private/appframework/http/request.php | |
parent | 9f91d64918f70002ec5043613f83694137c2d9ee (diff) | |
download | nextcloud-server-992164446cf7da39078d879300475b6353e1d40f.tar.gz nextcloud-server-992164446cf7da39078d879300475b6353e1d40f.zip |
Add blackmagic due to cyclic dependency :see_no_evil:
Diffstat (limited to 'lib/private/appframework/http/request.php')
-rw-r--r-- | lib/private/appframework/http/request.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/appframework/http/request.php b/lib/private/appframework/http/request.php index 97e9809c1fb..5cffbccb623 100644 --- a/lib/private/appframework/http/request.php +++ b/lib/private/appframework/http/request.php @@ -80,7 +80,7 @@ class Request implements \ArrayAccess, \Countable, IRequest { * @see http://www.php.net/manual/en/reserved.variables.php */ public function __construct(array $vars=array(), - ISecureRandom $secureRandom, + ISecureRandom $secureRandom = null, IConfig $config, $stream='php://input') { $this->inputStream = $stream; @@ -596,8 +596,8 @@ class Request implements \ArrayAccess, \Countable, IRequest { $name = $this->server['SCRIPT_NAME']; $overwriteWebRoot = $this->config->getSystemValue('overwritewebroot'); if ($overwriteWebRoot !== '' && $this->isOverwriteCondition()) { - // FIXME: This code is untestable due to ___DIR__ - $serverRoot = str_replace('\\', '/', substr(__DIR__, 0, -strlen('lib/private/'))); + // FIXME: This code is untestable due to __DIR__, also that hardcoded path is really dangerous + $serverRoot = str_replace('\\', '/', substr(__DIR__, 0, -strlen('lib/private/appframework/http/'))); $suburi = str_replace('\\', '/', substr(realpath($this->server['SCRIPT_FILENAME']), strlen($serverRoot))); $name = '/' . ltrim($overwriteWebRoot . $suburi, '/'); } |