Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate forwarded for headers check #41438

Merged
merged 6 commits into from
Nov 21, 2023

Conversation

come-nc
Copy link
Contributor

@come-nc come-nc commented Nov 13, 2023

Summary

Migrate forwarded for headers check to new SetupCheck API.

Checklist

@come-nc come-nc added the 2. developing Work in progress label Nov 13, 2023
@come-nc come-nc added this to the Nextcloud 28 milestone Nov 13, 2023
@come-nc come-nc self-assigned this Nov 13, 2023
@come-nc come-nc added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Nov 13, 2023
This was referenced Nov 14, 2023
Base automatically changed from feat/migrate-bruteforce-throttle-check to master November 20, 2023 10:32
@come-nc come-nc marked this pull request as ready for review November 20, 2023 10:32
@come-nc come-nc requested review from a team, ArtificialOwl, icewind1991 and Altahrim and removed request for a team November 20, 2023 10:34
@come-nc come-nc force-pushed the feat/migrate-forwarded-for-headers-check branch from c7637e8 to 0ebd44a Compare November 20, 2023 10:36
@blizzz blizzz mentioned this pull request Nov 20, 2023
5 tasks
@come-nc
Copy link
Contributor Author

come-nc commented Nov 20, 2023

There were 5 errors:
463	
464	1) OCA\Settings\Tests\ForwardedForHeadersTest::testForwardedForHeadersWorking with data set "trusted proxy, remote addr is trusted proxy, x-forwarded-for working" (array('1.1.1.1'), '1.1.1.1', '2.2.2.2', 'success')
465	TypeError: OCA\Settings\Tests\ForwardedForHeadersTest::OCA\Settings\Tests\{closure}(): Argument #2 ($replace) must be of type array, string given, called in phar:///usr/local/bin/phpunit/phpunit/Framework/MockObject/Stub/ReturnCallback.php on line 32
466	
467	/drone/src/apps/settings/tests/SetupChecks/ForwardedForHeadersTest.php:51
468	/drone/src/apps/settings/lib/SetupChecks/ForwardedForHeaders.php:82
469	/drone/src/apps/settings/tests/SetupChecks/ForwardedForHeadersTest.php:85
470	
471	2) OCA\Settings\Tests\Settings\Admin\SharingTest::testGetFormWithoutExcludedGroups
472	ArgumentCountError: Too few arguments to function OCA\Settings\Settings\Admin\Sharing::__construct(), 4 passed in /drone/src/apps/settings/tests/Settings/Admin/SharingTest.php on line 68 and exactly 7 expected
473	
474	/drone/src/apps/settings/lib/Settings/Admin/Sharing.php:48
475	/drone/src/apps/settings/tests/Settings/Admin/SharingTest.php:68
476	
477	3) OCA\Settings\Tests\Settings\Admin\SharingTest::testGetFormWithExcludedGroups
478	ArgumentCountError: Too few arguments to function OCA\Settings\Settings\Admin\Sharing::__construct(), 4 passed in /drone/src/apps/settings/tests/Settings/Admin/SharingTest.php on line 68 and exactly 7 expected
479	
480	/drone/src/apps/settings/lib/Settings/Admin/Sharing.php:48
481	/drone/src/apps/settings/tests/Settings/Admin/SharingTest.php:68
482	
483	4) OCA\Settings\Tests\Settings\Admin\SharingTest::testGetSection
484	ArgumentCountError: Too few arguments to function OCA\Settings\Settings\Admin\Sharing::__construct(), 4 passed in /drone/src/apps/settings/tests/Settings/Admin/SharingTest.php on line 68 and exactly 7 expected
485	
486	/drone/src/apps/settings/lib/Settings/Admin/Sharing.php:48
487	/drone/src/apps/settings/tests/Settings/Admin/SharingTest.php:68
488	
489	5) OCA\Settings\Tests\Settings\Admin\SharingTest::testGetPriority
490	ArgumentCountError: Too few arguments to function OCA\Settings\Settings\Admin\Sharing::__construct(), 4 passed in /drone/src/apps/settings/tests/Settings/Admin/SharingTest.php on line 68 and exactly 7 expected
491	
492	/drone/src/apps/settings/lib/Settings/Admin/Sharing.php:48
493	/drone/src/apps/settings/tests/Settings/Admin/SharingTest.php:68
494	
495	--
496	
497	There was 1 failure:
498	
499	1) OCA\Settings\Tests\ForwardedForHeadersTest::testForwardedHostPresentButTrustedProxiesEmpty
500	Failed asserting that two strings are equal.
501	--- Expected
502	+++ Actual
503	@@ @@
504	-'warning'
505	+'error'
506	
507	/drone/src/apps/settings/tests/SetupChecks/ForwardedForHeadersTest.php:137

Failure related

Signed-off-by: Côme Chilliet <[email protected]>
@come-nc
Copy link
Contributor Author

come-nc commented Nov 21, 2023

New drone errors are unrelated.

@come-nc come-nc merged commit 24c2c09 into master Nov 21, 2023
49 of 50 checks passed
@come-nc come-nc deleted the feat/migrate-forwarded-for-headers-check branch November 21, 2023 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants