refactor: remove source host allowlist from direct login
This commit is contained in:
@@ -49,12 +49,12 @@ test('settings reject unsupported mx login mode values', function (): void {
|
||||
}
|
||||
});
|
||||
|
||||
test('settings parse allowed source hosts as normalized hostnames', function (): void {
|
||||
$settings = Settings::fromArray([
|
||||
'MAIL_LOGIN_ALLOWED_SOURCE_HOSTS' => 'https://h4.domena.pl:2222, serwer2.example.net:2222',
|
||||
]);
|
||||
test('source plugin settings do not expose local source host allowlist', function (): void {
|
||||
$defaults = Settings::defaults();
|
||||
$config = file_get_contents(PLUGIN_ROOT . '/plugin-settings.conf') ?: '';
|
||||
|
||||
assert_same(['h4.domena.pl', 'serwer2.example.net'], $settings->allowedSourceHosts());
|
||||
assert_false(array_key_exists('MAIL_LOGIN_ALLOWED_SOURCE_HOSTS', $defaults));
|
||||
assert_not_contains('MAIL_LOGIN_ALLOWED_SOURCE_HOSTS', $config);
|
||||
});
|
||||
|
||||
test('settings reject disabled plugin and unsupported methods through access guard', function (): void {
|
||||
|
||||
Reference in New Issue
Block a user