Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-02-17 01:41:54 +0300
committerJoas Schilling <coding@schilljs.com>2022-02-23 13:01:58 +0300
commit07a9f34385a80570c2121f73d04bba12cfd39b3d (patch)
treef360b0e6b1f2293dbb644d27d0d3a2cb05ea6c92 /lib/base.php
parent98fd66b1377c50a4257f9bd185d02d79c10cba11 (diff)
Extract request id handling to dedicated class so it can be injected manually
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php6
1 files changed, 5 insertions, 1 deletions
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';