diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2022-03-22 12:08:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-22 12:08:45 +0100 |
commit | 0acd4b5f8202be8b3f3b4e6d7481e3d23e496b86 (patch) | |
tree | 06897c455b69be134fcd61b0f0130609ce7a75a1 /lib/base.php | |
parent | b6209d61251f7abacefb8cf3c164d39bcba29100 (diff) | |
parent | 67452b94ca0b59a063c4364f5930bb5186db2d55 (diff) | |
download | nextcloud-server-0acd4b5f8202be8b3f3b4e6d7481e3d23e496b86.tar.gz nextcloud-server-0acd4b5f8202be8b3f3b4e6d7481e3d23e496b86.zip |
Merge pull request #31235 from nextcloud/techdebt/noid/extract-request-id
Extract request id handling to dedicated class so it can be injected without DB dependency
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php index 2dd878fdbbc..f3c3e4f31cb 100644 --- a/lib/base.php +++ b/lib/base.php @@ -161,7 +161,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'; |