diff --git a/includes/core/login.js.php b/includes/core/login.js.php index d93ee8fd9..3fd78b724 100755 --- a/includes/core/login.js.php +++ b/includes/core/login.js.php @@ -627,11 +627,7 @@ function launchIdentify(isDuo, redirect, psk, oauth2 = false) { //TODO : je pense que cela pourrait etre modifié pour ne pas faire de requete ajax ; on dispose des infos via `get_teampass_settings` $.post( 'sources/identify.php', { - type: 'get2FAMethods', - login: $('#login').val(), - xhrFields: { - withCredentials: true - } + type: 'get2FAMethods' }, function(data) { data = JSON.parse(data); diff --git a/includes/language/bulgarian.php b/includes/language/bulgarian.php index e02fc1121..9e4f103a0 100755 --- a/includes/language/bulgarian.php +++ b/includes/language/bulgarian.php @@ -1188,7 +1188,6 @@ 'show_item_data_tip' => 'Permits to display extra information in the items list (username, email and url). This could be useful to have a quick view of the item content.', 'items_page_split_view_mode' => 'Show item details in page split view mode', 'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.', - 'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD', 'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application', 'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD', 'highlight_favorites' => 'Highlight favorites', diff --git a/includes/language/catalan.php b/includes/language/catalan.php index 3df3a347f..650c8c0a9 100755 --- a/includes/language/catalan.php +++ b/includes/language/catalan.php @@ -1188,7 +1188,6 @@ 'show_item_data_tip' => 'Permits to display extra information in the items list (username, email and url). This could be useful to have a quick view of the item content.', 'items_page_split_view_mode' => 'Show item details in page split view mode', 'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.', - 'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD', 'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application', 'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD', 'highlight_favorites' => 'Highlight favorites', diff --git a/includes/language/chinese.php b/includes/language/chinese.php index 2743f9f81..6b4bbf6f2 100755 --- a/includes/language/chinese.php +++ b/includes/language/chinese.php @@ -1188,7 +1188,6 @@ 'show_item_data_tip' => 'Permits to display extra information in the items list (username, email and url). This could be useful to have a quick view of the item content.', 'items_page_split_view_mode' => 'Show item details in page split view mode', 'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.', - 'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD', 'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application', 'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD', 'highlight_favorites' => 'Highlight favorites', diff --git a/includes/language/czech.php b/includes/language/czech.php index 7846aabb2..46505d7a3 100755 --- a/includes/language/czech.php +++ b/includes/language/czech.php @@ -1188,7 +1188,6 @@ 'show_item_data_tip' => 'Permits to display extra information in the items list (username, email and url). This could be useful to have a quick view of the item content.', 'items_page_split_view_mode' => 'Show item details in page split view mode', 'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.', - 'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD', 'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application', 'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD', 'highlight_favorites' => 'Highlight favorites', diff --git a/includes/language/dutch.php b/includes/language/dutch.php index cae5a7d48..444df9802 100755 --- a/includes/language/dutch.php +++ b/includes/language/dutch.php @@ -1188,7 +1188,6 @@ 'show_item_data_tip' => 'Permits to display extra information in the items list (username, email and url). This could be useful to have a quick view of the item content.', 'items_page_split_view_mode' => 'Show item details in page split view mode', 'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.', - 'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD', 'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application', 'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD', 'highlight_favorites' => 'Highlight favorites', diff --git a/includes/language/english.php b/includes/language/english.php index 999b3ceca..a9039874f 100755 --- a/includes/language/english.php +++ b/includes/language/english.php @@ -39,7 +39,6 @@ 'highlight_selected_tip' => 'When enabled, the selected item will be highlighted in the list.', 'highlight_favorites' => 'Highlight favorites', 'highlight_favorites_tip' => 'When enabled, the favorite items will be highlighted in the list.', - 'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD', 'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application', 'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD', 'oauth2_need_user_old_password' => 'For the first SSO connection, please provide your previous password', diff --git a/includes/language/estonian.php b/includes/language/estonian.php index 5f34a9fcb..45de97594 100755 --- a/includes/language/estonian.php +++ b/includes/language/estonian.php @@ -1188,7 +1188,6 @@ 'show_item_data_tip' => 'Permits to display extra information in the items list (username, email and url). This could be useful to have a quick view of the item content.', 'items_page_split_view_mode' => 'Show item details in page split view mode', 'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.', - 'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD', 'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application', 'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD', 'highlight_favorites' => 'Highlight favorites', diff --git a/includes/language/french.php b/includes/language/french.php index 4cc234e36..a15e86453 100755 --- a/includes/language/french.php +++ b/includes/language/french.php @@ -1189,7 +1189,6 @@ 'show_item_data_tip' => 'Permet d'afficher des informations supplémentaires dans la liste des éléments (nom d'utilisateur, e-mail et URL). Cela peut être utile pour avoir un aperçu rapide du contenu de l'élément.', 'items_page_split_view_mode' => 'Afficher le détail d'un objet sur la page des objets', 'replace_tenant_id' => 'Adapter l'url tout en laissant {tenant-id}. Il sera remplacer lors de l'appel.', - 'user_exists_but_not_oauth2' => 'Vous devez vous authentifier avec votre compte Azure/Entra AD', 'user_not_allowed_to_auth_to_teampass_app' => 'Vous n'êtes pas autoriser à vous authentifier à l'application Teampass', 'user_is_not_auth_with_oauth2' => 'Vous ne pouvez pas vous authentifier avec un compte Entra/Azure AD', 'highlight_favorites' => 'Mettre en évidence les favoris', diff --git a/includes/language/german.php b/includes/language/german.php index a53a5cd46..d460cf735 100755 --- a/includes/language/german.php +++ b/includes/language/german.php @@ -1188,7 +1188,6 @@ 'show_item_data_tip' => 'Zeigt zusätzliche Informationen in der Eintragsliste an (Benutzername, E-Mail, URL). Dies erlaubt einen schnellen Überblick über den Inhalt der Einträge.', 'items_page_split_view_mode' => 'Show item details in page split view mode', 'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.', - 'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD', 'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application', 'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD', 'highlight_favorites' => 'Highlight favorites', diff --git a/includes/language/greek.php b/includes/language/greek.php index 07711acaa..6a94f056c 100755 --- a/includes/language/greek.php +++ b/includes/language/greek.php @@ -1188,7 +1188,6 @@ 'show_item_data_tip' => 'Permits to display extra information in the items list (username, email and url). This could be useful to have a quick view of the item content.', 'items_page_split_view_mode' => 'Show item details in page split view mode', 'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.', - 'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD', 'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application', 'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD', 'highlight_favorites' => 'Highlight favorites', diff --git a/includes/language/hungarian.php b/includes/language/hungarian.php index 0331904f6..eea0f226c 100755 --- a/includes/language/hungarian.php +++ b/includes/language/hungarian.php @@ -1188,7 +1188,6 @@ 'show_item_data_tip' => 'Permits to display extra information in the items list (username, email and url). This could be useful to have a quick view of the item content.', 'items_page_split_view_mode' => 'Show item details in page split view mode', 'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.', - 'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD', 'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application', 'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD', 'highlight_favorites' => 'Highlight favorites', diff --git a/includes/language/italian.php b/includes/language/italian.php index 151c2d130..388542f3c 100755 --- a/includes/language/italian.php +++ b/includes/language/italian.php @@ -1188,7 +1188,6 @@ 'show_item_data_tip' => 'Permits to display extra information in the items list (username, email and url). This could be useful to have a quick view of the item content.', 'items_page_split_view_mode' => 'Show item details in page split view mode', 'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.', - 'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD', 'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application', 'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD', 'highlight_favorites' => 'Highlight favorites', diff --git a/includes/language/japanese.php b/includes/language/japanese.php index 0529a7cc9..6750c6d64 100755 --- a/includes/language/japanese.php +++ b/includes/language/japanese.php @@ -1188,7 +1188,6 @@ 'show_item_data_tip' => 'Permits to display extra information in the items list (username, email and url). This could be useful to have a quick view of the item content.', 'items_page_split_view_mode' => 'Show item details in page split view mode', 'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.', - 'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD', 'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application', 'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD', 'highlight_favorites' => 'Highlight favorites', diff --git a/includes/language/norwegian.php b/includes/language/norwegian.php index 5f9ef5bc4..34c875587 100755 --- a/includes/language/norwegian.php +++ b/includes/language/norwegian.php @@ -1188,7 +1188,6 @@ 'show_item_data_tip' => 'Permits to display extra information in the items list (username, email and url). This could be useful to have a quick view of the item content.', 'items_page_split_view_mode' => 'Show item details in page split view mode', 'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.', - 'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD', 'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application', 'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD', 'highlight_favorites' => 'Highlight favorites', diff --git a/includes/language/polish.php b/includes/language/polish.php index 78e432d11..f283bd484 100755 --- a/includes/language/polish.php +++ b/includes/language/polish.php @@ -1188,7 +1188,6 @@ 'show_item_data_tip' => 'Permits to display extra information in the items list (username, email and url). This could be useful to have a quick view of the item content.', 'items_page_split_view_mode' => 'Show item details in page split view mode', 'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.', - 'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD', 'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application', 'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD', 'highlight_favorites' => 'Highlight favorites', diff --git a/includes/language/portuguese.php b/includes/language/portuguese.php index abea07d58..94671b22d 100755 --- a/includes/language/portuguese.php +++ b/includes/language/portuguese.php @@ -1188,7 +1188,6 @@ 'show_item_data_tip' => 'Permits to display extra information in the items list (username, email and url). This could be useful to have a quick view of the item content.', 'items_page_split_view_mode' => 'Show item details in page split view mode', 'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.', - 'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD', 'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application', 'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD', 'highlight_favorites' => 'Highlight favorites', diff --git a/includes/language/portuguese_br.php b/includes/language/portuguese_br.php index c47a7f13e..0a0edaba7 100755 --- a/includes/language/portuguese_br.php +++ b/includes/language/portuguese_br.php @@ -1188,7 +1188,6 @@ 'show_item_data_tip' => 'Permits to display extra information in the items list (username, email and url). This could be useful to have a quick view of the item content.', 'items_page_split_view_mode' => 'Show item details in page split view mode', 'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.', - 'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD', 'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application', 'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD', 'highlight_favorites' => 'Highlight favorites', diff --git a/includes/language/romanian.php b/includes/language/romanian.php index 469a87866..af8905072 100755 --- a/includes/language/romanian.php +++ b/includes/language/romanian.php @@ -1188,7 +1188,6 @@ 'show_item_data_tip' => 'Permits to display extra information in the items list (username, email and url). This could be useful to have a quick view of the item content.', 'items_page_split_view_mode' => 'Show item details in page split view mode', 'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.', - 'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD', 'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application', 'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD', 'highlight_favorites' => 'Highlight favorites', diff --git a/includes/language/russian.php b/includes/language/russian.php index 2d72730e8..897e11092 100755 --- a/includes/language/russian.php +++ b/includes/language/russian.php @@ -1188,7 +1188,6 @@ 'show_item_data_tip' => 'Permits to display extra information in the items list (username, email and url). This could be useful to have a quick view of the item content.', 'items_page_split_view_mode' => 'Show item details in page split view mode', 'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.', - 'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD', 'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application', 'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD', 'highlight_favorites' => 'Highlight favorites', diff --git a/includes/language/spanish.php b/includes/language/spanish.php index 993af2ae3..d4139ea21 100755 --- a/includes/language/spanish.php +++ b/includes/language/spanish.php @@ -1188,7 +1188,6 @@ 'show_item_data_tip' => 'Permite mostrar información adicional en la lista de elementos (nombre de usuario, correo electrónico y URL). Esto podría ser útil para tener una vista rápida del contenido del elemento.', 'items_page_split_view_mode' => 'Mostrar los detalles del elemento en modo de vista dividida de página', 'replace_tenant_id' => 'Adapte la URL pero mantenga {tenant-id} tal cual. Se reemplazará en vivo por el ID del inquilino.', - 'user_exists_but_not_oauth2' => 'El usuario debe autenticarse utilizando Entra/Azure AD', 'user_not_allowed_to_auth_to_teampass_app' => 'El usuario no tiene permitido autenticarse en la aplicación Teampass', 'user_is_not_auth_with_oauth2' => 'El usuario no debe autenticarse con Entra/Azure AD', 'highlight_favorites' => 'Resaltar favoritos', diff --git a/includes/language/swedish.php b/includes/language/swedish.php index 67a64668d..4943010dc 100755 --- a/includes/language/swedish.php +++ b/includes/language/swedish.php @@ -1188,7 +1188,6 @@ 'show_item_data_tip' => 'Permits to display extra information in the items list (username, email and url). This could be useful to have a quick view of the item content.', 'items_page_split_view_mode' => 'Show item details in page split view mode', 'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.', - 'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD', 'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application', 'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD', 'highlight_favorites' => 'Highlight favorites', diff --git a/includes/language/turkish.php b/includes/language/turkish.php index 1270f4658..54cf1a77f 100755 --- a/includes/language/turkish.php +++ b/includes/language/turkish.php @@ -1188,7 +1188,6 @@ 'show_item_data_tip' => 'Permits to display extra information in the items list (username, email and url). This could be useful to have a quick view of the item content.', 'items_page_split_view_mode' => 'Show item details in page split view mode', 'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.', - 'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD', 'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application', 'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD', 'highlight_favorites' => 'Highlight favorites', diff --git a/includes/language/ukrainian.php b/includes/language/ukrainian.php index 413d48b4b..7bd869593 100755 --- a/includes/language/ukrainian.php +++ b/includes/language/ukrainian.php @@ -1188,7 +1188,6 @@ 'show_item_data_tip' => 'Дозволяє відображати додаткову інформацію у списку елементів (ім'я користувача, електронна пошта та URL). Це може бути корисно для швидкого перегляду вмісту елемента.', 'items_page_split_view_mode' => 'Показати деталі елемента у режимі розділеного перегляду сторінки', 'replace_tenant_id' => 'Адаптувати URL, але залишити {tenant-id} як є. Він буде замінений в реальному часі на ID орендаря.', - 'user_exists_but_not_oauth2' => 'Користувач повинен автентифікуватися за допомогою Entra/Azure AD', 'user_not_allowed_to_auth_to_teampass_app' => 'Користувачеві не дозволено автентифікуватися за допомогою додатку Teampass', 'user_is_not_auth_with_oauth2' => 'Користувач не повинен автентифікуватися за допомогою Entra/Azure AD', 'highlight_favorites' => 'Виділити обрані', diff --git a/includes/language/vietnamese.php b/includes/language/vietnamese.php index bcf5a19d9..950ae615d 100755 --- a/includes/language/vietnamese.php +++ b/includes/language/vietnamese.php @@ -1188,7 +1188,6 @@ 'show_item_data_tip' => 'Permits to display extra information in the items list (username, email and url). This could be useful to have a quick view of the item content.', 'items_page_split_view_mode' => 'Show item details in page split view mode', 'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.', - 'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD', 'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application', 'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD', 'highlight_favorites' => 'Highlight favorites', diff --git a/sources/identify.php b/sources/identify.php index e8a625db3..006e1c782 100755 --- a/sources/identify.php +++ b/sources/identify.php @@ -2229,6 +2229,9 @@ function identifyDoLDAPChecks( int $sessionPwdAttempts ): array { + $session = SessionManager::getSession(); + $lang = new Language($session->get('user-language') ?? 'english'); + // Prepare LDAP connection if set up if ((int) $SETTINGS['ldap_mode'] === 1 && $username !== 'admin' @@ -2249,7 +2252,7 @@ function identifyDoLDAPChecks( 'initial_url' => isset($sessionUrl) === true ? $sessionUrl : '', 'pwd_attempts' => (int) $sessionPwdAttempts, 'error' => true, - 'message' => "LDAP error: ".$retLDAP['message'], + 'message' => $lang->get('error_bad_credentials'), ] ]; } @@ -2338,7 +2341,7 @@ function shouldUserAuthWithOauth2( // Case where user exists in Teampass but not allowed to auth with Oauth2 return [ 'error' => true, - 'message' => 'user_exists_but_not_oauth2', + 'message' => 'error_bad_credentials', 'oauth2Connection' => false, 'userPasswordVerified' => false, ];