fix: harden mx helper and cleanup flow
This commit is contained in:
@@ -7,6 +7,12 @@ return static function (): void {
|
||||
}
|
||||
|
||||
$settings = Settings::load(Settings::EXTERNAL_SETTINGS);
|
||||
if (!$settings->defaultEnable()) {
|
||||
Http::errorPage('Plugin nie jest włączony dla tego serwera.', 403);
|
||||
}
|
||||
if ($settings->method() !== 'login_url') {
|
||||
Http::errorPage('Metoda logowania nie jest obsługiwana.', 500);
|
||||
}
|
||||
$ctx = DirectAdminContext::fromServer($_SERVER, $settings);
|
||||
SourceAuthorizer::assertAllowed($ctx->sourceHost(), $settings);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user