diff --git a/core/authentication/app_languages.php b/core/authentication/app_languages.php index 19cefd67d4..f3d170746c 100644 --- a/core/authentication/app_languages.php +++ b/core/authentication/app_languages.php @@ -97,7 +97,6 @@ $text['description-totp']['pt-br'] = "Escaneie o código com um aplicativo de au $text['description-totp']['pt-pt'] = "Escaneie o código com um aplicativo de autenticação ou gerenciador de senhas. Em seguida, use-o para gerar o token para o login."; $text['description-totp']['ro-ro'] = "Scanați codul cu o aplicație de autentificare sau un manager de parole. Apoi utilizați-l pentru a genera simbolul pentru autentificare."; $text['description-totp']['ru-ru'] = "Отсканируйте код с помощью приложения для аутентификации или менеджера паролей. Затем используйте его для создания токена для входа в систему."; - $text['description-totp']['sv-se'] = "Skanna koden med en autentiseringsapplikation eller lösenordshanterare. Använd sedan den för att generera token för inloggningen."; $text['description-totp']['uk-ua'] = "Відскануйте код за допомогою програми автентифікації або менеджера паролів. Потім використовуйте його, щоб створити маркер для входу."; $text['description-totp']['tr-tr'] = "Kodu bir kimlik doğrulama uygulaması veya parola yöneticisi ile tarayın. Ardından, oturum açma için belirteci oluşturmak için kullanın."; @@ -105,4 +104,30 @@ $text['description-totp']['zh-cn'] = "载有认证申请或密码管理员的编 $text['description-totp']['ja-jp'] = "認証アプリケーションまたはパスワードマネージャでコードをスキャンします。 ログイン時にトークンを生成します。"; $text['description-totp']['ko-kr'] = "인증 신청서 또는 비밀번호 관리자로 코드를 스캔합니다. 그런 다음 로그인 토큰을 생성합니다."; -?> +$text['message-authentication_failed']['en-us'] = "Authentication Failed"; +$text['message-authentication_failed']['en-gb'] = "Authentication Failed"; +$text['message-authentication_failed']['ar-eg'] = ""; +$text['message-authentication_failed']['de-at'] = ""; +$text['message-authentication_failed']['de-ch'] = ""; +$text['message-authentication_failed']['de-de'] = ""; +$text['message-authentication_failed']['el-gr'] = ""; +$text['message-authentication_failed']['es-cl'] = ""; +$text['message-authentication_failed']['es-mx'] = ""; +$text['message-authentication_failed']['fr-ca'] = ""; +$text['message-authentication_failed']['fr-fr'] = ""; +$text['message-authentication_failed']['he-il'] = ""; +$text['message-authentication_failed']['it-it'] = ""; +$text['message-authentication_failed']['nl-nl'] = ""; +$text['message-authentication_failed']['pl-pl'] = ""; +$text['message-authentication_failed']['pt-br'] = ""; +$text['message-authentication_failed']['pt-pt'] = ""; +$text['message-authentication_failed']['ro-ro'] = ""; +$text['message-authentication_failed']['ru-ru'] = ""; +$text['message-authentication_failed']['sv-se'] = ""; +$text['message-authentication_failed']['uk-ua'] = ""; +$text['message-authentication_failed']['tr-tr'] = ""; +$text['message-authentication_failed']['zh-cn'] = ""; +$text['message-authentication_failed']['ja-jp'] = ""; +$text['message-authentication_failed']['ko-kr'] = ""; + +?> \ No newline at end of file diff --git a/core/authentication/resources/classes/authentication.php b/core/authentication/resources/classes/authentication.php index 0804189619..c5d8844a42 100644 --- a/core/authentication/resources/classes/authentication.php +++ b/core/authentication/resources/classes/authentication.php @@ -53,7 +53,7 @@ class authentication { foreach ($_SESSION['authentication']['methods'] as $name) { //already processed the plugin move to the next plugin - if ($_SESSION['authentication']['plugin'][$name]['authorized']) { + if (!empty($_SESSION['authentication']['plugin']) && $_SESSION['authentication']['plugin'][$name]['authorized']) { continue; } diff --git a/core/authentication/resources/classes/plugins/database.php b/core/authentication/resources/classes/plugins/database.php index 7878c9217b..296ae90ca2 100644 --- a/core/authentication/resources/classes/plugins/database.php +++ b/core/authentication/resources/classes/plugins/database.php @@ -32,6 +32,7 @@ class plugin_database { $settings['theme']['logo'] = !empty($_SESSION['theme']['logo']['text']) ? $_SESSION['theme']['logo']['text'] : PROJECT_PATH.'/themes/default/images/logo_login.png'; $settings['theme']['login_logo_width'] = !empty($_SESSION['theme']['login_logo_width']['text']) ? $_SESSION['theme']['login_logo_width']['text'] : 'auto; max-width: 300px'; $settings['theme']['login_logo_height'] = !empty($_SESSION['theme']['login_logo_height']['text']) ? $_SESSION['theme']['login_logo_height']['text'] : 'auto; max-height: 300px'; + $settings['theme']['message_delay'] = isset($_SESSION['theme']['message_delay']) ? 1000 * (float) $_SESSION['theme']['message_delay'] : 3000; //already authorized if (isset($_SESSION['authentication']['plugin']['database']) && $_SESSION['authentication']['plugin']['database']["authorized"]) { @@ -81,6 +82,10 @@ class plugin_database { $view->assign("login_logo_width", $settings['theme']['login_logo_width']); $view->assign("login_logo_height", $settings['theme']['login_logo_height']); $view->assign("login_logo_source", $settings['theme']['logo']); + $view->assign("message_delay", $settings['theme']['message_delay']); + + //messages + $view->assign('messages', message::html(true, ' ')); //add the token name and hash to the view //$view->assign("token_name", $token['name']); diff --git a/core/authentication/resources/views/login.htm b/core/authentication/resources/views/login.htm index 0ad404dc29..9c60b818e4 100644 --- a/core/authentication/resources/views/login.htm +++ b/core/authentication/resources/views/login.htm @@ -7,10 +7,60 @@ + + + {$login_title}
+

diff --git a/resources/app_languages.php b/resources/app_languages.php index ad15be5757..431c4750b5 100644 --- a/resources/app_languages.php +++ b/resources/app_languages.php @@ -286,32 +286,6 @@ $text['message-toggle']['zh-cn'] = "切换完成"; $text['message-toggle']['ja-jp'] = "切り替えが完了しました"; $text['message-toggle']['ko-kr'] = "토글 완료됨"; -$text['message-invalid_credentials']['en-us'] = "Invalid Username and/or Password"; -$text['message-invalid_credentials']['en-gb'] = "Invalid Username and/or Password"; -$text['message-invalid_credentials']['ar-eg'] = "اسم المستخدم و / أو كلمة المرور غير صالحة"; -$text['message-invalid_credentials']['de-at'] = "Ungültiger Benutzername und/oder Passwort"; -$text['message-invalid_credentials']['de-ch'] = "Ungültiger Benutzername und/oder Passwort"; -$text['message-invalid_credentials']['de-de'] = "Ungültiger Benutzername und/oder Passwort"; -$text['message-invalid_credentials']['el-gr'] = "Λάθος στοιχεία εισόδου"; -$text['message-invalid_credentials']['es-cl'] = "Nombre de usuario y / o contraseña inválido"; -$text['message-invalid_credentials']['es-mx'] = "Nombre de usuario y / o contraseña inválido"; -$text['message-invalid_credentials']['fr-ca'] = "Nom d'utilisateur et / ou mot de passe incorrect"; -$text['message-invalid_credentials']['fr-fr'] = "Nom d'utilisateur et / ou mot de passe incorrect"; -$text['message-invalid_credentials']['he-il'] = "שם משתמש ו/או סיסמה לא חוקיים"; -$text['message-invalid_credentials']['it-it'] = "Username e / o password non validi"; -$text['message-invalid_credentials']['nl-nl'] = "Ongeldige gebruikersnaam en / of wachtwoord"; -$text['message-invalid_credentials']['pl-pl'] = "Niepoprawna nazwa użytkownika i/lub hasło"; -$text['message-invalid_credentials']['pt-br'] = "Nome de usuário e/ou senha inválida"; -$text['message-invalid_credentials']['pt-pt'] = "Nome de usuário e/ou senha inválidos"; -$text['message-invalid_credentials']['ro-ro'] = "Nume de utilizator și / sau parolă nevalide"; -$text['message-invalid_credentials']['ru-ru'] = "Неверное имя пользователя или пароль"; -$text['message-invalid_credentials']['sv-se'] = "Ogiltigt användarnamn och / eller lösenord"; -$text['message-invalid_credentials']['uk-ua'] = "Недійсне ім'я користувача та/або пароль"; -$text['message-invalid_credentials']['tr-tr'] = "Geçersiz Kullanıcı Adı ve/veya Parola"; -$text['message-invalid_credentials']['zh-cn'] = "无效用户名称和/或密码"; -$text['message-invalid_credentials']['ja-jp'] = "無効なユーザー名とパスワード"; -$text['message-invalid_credentials']['ko-kr'] = "잘못된 Username 및/또는 Password"; - $text['message-invalid_token']['en-us'] = "Invalid Token"; $text['message-invalid_token']['en-gb'] = "Invalid Token"; $text['message-invalid_token']['ar-eg'] = "غير صحيح"; diff --git a/resources/check_auth.php b/resources/check_auth.php index 1302edabb9..b7d038838e 100644 --- a/resources/check_auth.php +++ b/resources/check_auth.php @@ -67,7 +67,7 @@ //redirect the user to the login page $target_path = ($_REQUEST["path"] != '') ? $_REQUEST["path"] : $_SERVER["PHP_SELF"]; - message::add($text['message-invalid_credentials'], 'negative'); + message::add($text['message-authentication_failed'], 'negative'); header("Location: ".PROJECT_PATH."/?path=".urlencode($target_path)); exit; }