]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fixed bug which 'overwritewebroot' does not work with 'overwritecondaddr'. 31001/head
authorSimon L <szaimen@e.mail.de>
Tue, 16 May 2023 09:39:39 +0000 (11:39 +0200)
committerSimon L <szaimen@e.mail.de>
Tue, 16 May 2023 09:39:39 +0000 (11:39 +0200)
Signed-off-by: Takahiro Nagai <78393959+takahiro-blab@users.noreply.github.com>
Signed-off-by: Simon L <szaimen@e.mail.de>
lib/base.php

index c7fde4136fef3f3d5c375d733e05a00e336e6848..83f97963c4d06ebc30d615fe44e20cb46b708773 100644 (file)
@@ -161,6 +161,9 @@ class OC {
                                'SCRIPT_FILENAME' => $_SERVER['SCRIPT_FILENAME'] ?? null,
                        ],
                ];
+               if (isset($_SERVER['REMOTE_ADDR'])) {
+                       $params['server']['REMOTE_ADDR'] = $_SERVER['REMOTE_ADDR'];
+               }
                $fakeRequest = new \OC\AppFramework\Http\Request(
                        $params,
                        new \OC\AppFramework\Http\RequestId($_SERVER['UNIQUE_ID'] ?? '', new \OC\Security\SecureRandom()),