From 07a9f34385a80570c2121f73d04bba12cfd39b3d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 16 Feb 2022 23:41:54 +0100 Subject: Extract request id handling to dedicated class so it can be injected manually Signed-off-by: Joas Schilling --- lib/base.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/base.php') diff --git a/lib/base.php b/lib/base.php index 3c10f7cb33a..deb950a8fb3 100644 --- a/lib/base.php +++ b/lib/base.php @@ -160,7 +160,11 @@ class OC { 'SCRIPT_FILENAME' => $_SERVER['SCRIPT_FILENAME'], ], ]; - $fakeRequest = new \OC\AppFramework\Http\Request($params, new \OC\Security\SecureRandom(), new \OC\AllConfig(new \OC\SystemConfig(self::$config))); + $fakeRequest = new \OC\AppFramework\Http\Request( + $params, + new \OC\AppFramework\Http\RequestId($_SERVER['UNIQUE_ID'] ?? '', new \OC\Security\SecureRandom()), + new \OC\AllConfig(new \OC\SystemConfig(self::$config)) + ); $scriptName = $fakeRequest->getScriptName(); if (substr($scriptName, -1) == '/') { $scriptName .= 'index.php'; -- cgit v1.2.3