add Config::DISABLE_LOGIN_FORM to allow limiting logins to SSO providers

This commit is contained in:
Andrew Dolgov
2025-03-14 11:32:46 +03:00
parent 1fc4eed6cd
commit d373c1f978
4 changed files with 67 additions and 48 deletions

View File

@@ -431,6 +431,13 @@ class Handler_Public extends Handler {
}
function forgotpass(): void {
if (Config::get(Config::DISABLE_LOGIN_FORM) || !str_contains(Config::get(Config::PLUGINS), "auth_internal")) {
header($_SERVER["SERVER_PROTOCOL"]." 403 Forbidden");
echo "Forbidden.";
return;
}
startup_gettext();
session_start();