Skip to content

[stable29] fix(settings): define a 'heartbeat' route, so SecurityHeaders can handle redirected root - #45956

Merged
provokateurin merged 3 commits into
stable29from
backport/45228/stable29
Jul 10, 2024
Merged

[stable29] fix(settings): define a 'heartbeat' route, so SecurityHeaders can handle redirected root#45956
provokateurin merged 3 commits into
stable29from
backport/45228/stable29

Conversation

@backportbot

Copy link
Copy Markdown

Backport of PR #45228

@skjnldsvskjnldsv mentioned this pull request Jun 20, 2024
4 tasks
@blizzzblizzz mentioned this pull request Jun 21, 2024
@AltahrimAltahrim mentioned this pull request Jul 10, 2024
@kesselb
kesselbforce-pushed the backport/45228/stable29 branch from d5cd9c2 to caae551CompareJuly 10, 2024 12:38
@kesselb

Copy link
Copy Markdown
Contributor
1) Test\Route\RouterTest::testGenerateConsecutively
Unexpected info log: Symfony\Component\Routing\Exception\RouteNotFoundException: Unable to generate a URL for the named route "files.view.index" as such route does not exist. in /home/runner/work/server/server/3rdparty/symfony/routing/Generator/UrlGenerator.php:144
Stack trace:
#0 /home/runner/work/server/server/lib/private/Route/Router.php(410): Symfony\Component\Routing\Generator\UrlGenerator->generate('files.view.inde...', Array, 1)
#1 /home/runner/work/server/server/tests/lib/Route/RouterTest.php(68): OC\Route\Router->generate('files.view.inde...')
#2 /home/runner/work/server/server/vendor-bin/phpunit/vendor/phpunit/phpunit/src/Framework/TestCase.php(1608): Test\Route\RouterTest->testGenerateConsecutively()
#3 /home/runner/work/server/server/vendor-bin/phpunit/vendor/phpunit/phpunit/src/Framework/TestCase.php(1214): PHPUnit\Framework\TestCase->runTest()
#4 /home/runner/work/server/server/vendor-bin/phpunit/vendor/phpunit/phpunit/src/Framework/TestResult.php(728): PHPUnit\Framework\TestCase->runBare()
#5 /home/runner/work/server/server/vendor-bin/phpunit/vendor/phpunit/phpunit/src/Framework/TestCase.php(964): PHPUnit\Framework\TestResult->run(Object(Test\Route\RouterTest))
#6 /home/runner/work/server/server/vendor-bin/phpunit/vendor/phpunit/phpunit/src/Framework/TestSuite.php(684): PHPUnit\Framework\TestCase->run(Object(PHPUnit\Framework\TestResult))
#7 /home/runner/work/server/server/vendor-bin/phpunit/vendor/phpunit/phpunit/src/Framework/TestSuite.php(684): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#8 /home/runner/work/server/server/vendor-bin/phpunit/vendor/phpunit/phpunit/src/Framework/TestSuite.php(684): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#9 /home/runner/work/server/server/vendor-bin/phpunit/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(653): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#10 /home/runner/work/server/server/vendor-bin/phpunit/vendor/phpunit/phpunit/src/TextUI/Command.php(144): PHPUnit\TextUI\TestRunner->run(Object(PHPUnit\Framework\TestSuite), Array, Array, true)
#11 /home/runner/work/server/server/vendor-bin/phpunit/vendor/phpunit/phpunit/src/TextUI/Command.php(97): PHPUnit\TextUI\Command->run(Array, true)
#12 /home/runner/work/server/server/vendor-bin/phpunit/vendor/phpunit/phpunit/phpunit(98): PHPUnit\TextUI\Command::main()
#13 /home/runner/work/server/server/lib/composer/bin/phpunit(122): include('/home/runner/wo...')
#14 {main}
/home/runner/work/server/server/tests/lib/Route/RouterTest.php:50
/home/runner/work/server/server/lib/private/Route/Router.php:412
/home/runner/work/server/server/tests/lib/Route/RouterTest.php:68

@kesselb

kesselb commented Jul 10, 2024

Copy link
Copy Markdown
Contributor

Pushed 76efdb0 to fix the failing test.

The router uses include_once to load route definitions from the apps.

First include_once for apps/files/appinfo/routes.php returns the expected array.

Second include_once returns true, because the file was already included.

To workaround the tests must run in a separate process.

I have no idea why the test is not failing on master.

@kesselb

Copy link
Copy Markdown
Contributor

To workaround the tests must run in a separate process.

That does not seem to work

I have no idea why the test is not failing on master.

The test is not failing on master because the app manager instance is mocked, the app path is null and the routing file not even included: #46416

smokrisand others added 3 commits July 10, 2024 23:35
…dle redirected root
Signed-off-by: Steve Mokris <steve@kosada.com>
Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com>
Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@AndyScherzinger
AndyScherzingerforce-pushed the backport/45228/stable29 branch from de1f1a8 to a554ba5CompareJuly 10, 2024 21:35
@provokateurin
provokateurin merged commit 6167a4a into stable29Jul 10, 2024
@provokateurin
provokateurin deleted the backport/45228/stable29 branch July 10, 2024 23:24
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@kesselb@provokateurin@MichaIng@come-nc@blizzz@smokris