Skip to content

Commit f554fad

Browse files
Remove remaining account enumeration on login page.
1 parent 260d607 commit f554fad

26 files changed

+6
-31
lines changed

includes/core/login.js.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -627,11 +627,7 @@ function launchIdentify(isDuo, redirect, psk, oauth2 = false) {
627627
//TODO : je pense que cela pourrait etre modifié pour ne pas faire de requete ajax ; on dispose des infos via `get_teampass_settings`
628628
$.post(
629629
'sources/identify.php', {
630-
type: 'get2FAMethods',
631-
login: $('#login').val(),
632-
xhrFields: {
633-
withCredentials: true
634-
}
630+
type: 'get2FAMethods'
635631
},
636632
function(data) {
637633
data = JSON.parse(data);

includes/language/bulgarian.php

-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,6 @@
11881188
'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.',
11891189
'items_page_split_view_mode' => 'Show item details in page split view mode',
11901190
'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.',
1191-
'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD',
11921191
'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application',
11931192
'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD',
11941193
'highlight_favorites' => 'Highlight favorites',

includes/language/catalan.php

-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,6 @@
11881188
'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.',
11891189
'items_page_split_view_mode' => 'Show item details in page split view mode',
11901190
'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.',
1191-
'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD',
11921191
'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application',
11931192
'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD',
11941193
'highlight_favorites' => 'Highlight favorites',

includes/language/chinese.php

-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,6 @@
11881188
'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.',
11891189
'items_page_split_view_mode' => 'Show item details in page split view mode',
11901190
'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.',
1191-
'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD',
11921191
'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application',
11931192
'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD',
11941193
'highlight_favorites' => 'Highlight favorites',

includes/language/czech.php

-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,6 @@
11881188
'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.',
11891189
'items_page_split_view_mode' => 'Show item details in page split view mode',
11901190
'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.',
1191-
'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD',
11921191
'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application',
11931192
'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD',
11941193
'highlight_favorites' => 'Highlight favorites',

includes/language/dutch.php

-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,6 @@
11881188
'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.',
11891189
'items_page_split_view_mode' => 'Show item details in page split view mode',
11901190
'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.',
1191-
'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD',
11921191
'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application',
11931192
'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD',
11941193
'highlight_favorites' => 'Highlight favorites',

includes/language/english.php

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
'highlight_selected_tip' => 'When enabled, the selected item will be highlighted in the list.',
4040
'highlight_favorites' => 'Highlight favorites',
4141
'highlight_favorites_tip' => 'When enabled, the favorite items will be highlighted in the list.',
42-
'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD',
4342
'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application',
4443
'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD',
4544
'oauth2_need_user_old_password' => 'For the first SSO connection, please provide your previous password',

includes/language/estonian.php

-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,6 @@
11881188
'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.',
11891189
'items_page_split_view_mode' => 'Show item details in page split view mode',
11901190
'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.',
1191-
'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD',
11921191
'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application',
11931192
'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD',
11941193
'highlight_favorites' => 'Highlight favorites',

includes/language/french.php

-1
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,6 @@
11891189
'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.',
11901190
'items_page_split_view_mode' => 'Afficher le détail d'un objet sur la page des objets',
11911191
'replace_tenant_id' => 'Adapter l'url tout en laissant {tenant-id}. Il sera remplacer lors de l'appel.',
1192-
'user_exists_but_not_oauth2' => 'Vous devez vous authentifier avec votre compte Azure/Entra AD',
11931192
'user_not_allowed_to_auth_to_teampass_app' => 'Vous n'êtes pas autoriser à vous authentifier à l'application Teampass',
11941193
'user_is_not_auth_with_oauth2' => 'Vous ne pouvez pas vous authentifier avec un compte Entra/Azure AD',
11951194
'highlight_favorites' => 'Mettre en évidence les favoris',

includes/language/german.php

-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,6 @@
11881188
'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.',
11891189
'items_page_split_view_mode' => 'Show item details in page split view mode',
11901190
'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.',
1191-
'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD',
11921191
'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application',
11931192
'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD',
11941193
'highlight_favorites' => 'Highlight favorites',

includes/language/greek.php

-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,6 @@
11881188
'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.',
11891189
'items_page_split_view_mode' => 'Show item details in page split view mode',
11901190
'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.',
1191-
'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD',
11921191
'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application',
11931192
'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD',
11941193
'highlight_favorites' => 'Highlight favorites',

includes/language/hungarian.php

-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,6 @@
11881188
'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.',
11891189
'items_page_split_view_mode' => 'Show item details in page split view mode',
11901190
'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.',
1191-
'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD',
11921191
'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application',
11931192
'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD',
11941193
'highlight_favorites' => 'Highlight favorites',

includes/language/italian.php

-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,6 @@
11881188
'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.',
11891189
'items_page_split_view_mode' => 'Show item details in page split view mode',
11901190
'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.',
1191-
'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD',
11921191
'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application',
11931192
'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD',
11941193
'highlight_favorites' => 'Highlight favorites',

includes/language/japanese.php

-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,6 @@
11881188
'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.',
11891189
'items_page_split_view_mode' => 'Show item details in page split view mode',
11901190
'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.',
1191-
'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD',
11921191
'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application',
11931192
'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD',
11941193
'highlight_favorites' => 'Highlight favorites',

includes/language/norwegian.php

-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,6 @@
11881188
'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.',
11891189
'items_page_split_view_mode' => 'Show item details in page split view mode',
11901190
'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.',
1191-
'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD',
11921191
'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application',
11931192
'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD',
11941193
'highlight_favorites' => 'Highlight favorites',

includes/language/polish.php

-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,6 @@
11881188
'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.',
11891189
'items_page_split_view_mode' => 'Show item details in page split view mode',
11901190
'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.',
1191-
'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD',
11921191
'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application',
11931192
'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD',
11941193
'highlight_favorites' => 'Highlight favorites',

includes/language/portuguese.php

-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,6 @@
11881188
'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.',
11891189
'items_page_split_view_mode' => 'Show item details in page split view mode',
11901190
'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.',
1191-
'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD',
11921191
'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application',
11931192
'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD',
11941193
'highlight_favorites' => 'Highlight favorites',

includes/language/portuguese_br.php

-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,6 @@
11881188
'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.',
11891189
'items_page_split_view_mode' => 'Show item details in page split view mode',
11901190
'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.',
1191-
'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD',
11921191
'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application',
11931192
'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD',
11941193
'highlight_favorites' => 'Highlight favorites',

includes/language/romanian.php

-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,6 @@
11881188
'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.',
11891189
'items_page_split_view_mode' => 'Show item details in page split view mode',
11901190
'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.',
1191-
'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD',
11921191
'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application',
11931192
'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD',
11941193
'highlight_favorites' => 'Highlight favorites',

includes/language/russian.php

-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,6 @@
11881188
'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.',
11891189
'items_page_split_view_mode' => 'Show item details in page split view mode',
11901190
'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.',
1191-
'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD',
11921191
'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application',
11931192
'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD',
11941193
'highlight_favorites' => 'Highlight favorites',

includes/language/spanish.php

-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,6 @@
11881188
'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.',
11891189
'items_page_split_view_mode' => 'Mostrar los detalles del elemento en modo de vista dividida de página',
11901190
'replace_tenant_id' => 'Adapte la URL pero mantenga {tenant-id} tal cual. Se reemplazará en vivo por el ID del inquilino.',
1191-
'user_exists_but_not_oauth2' => 'El usuario debe autenticarse utilizando Entra/Azure AD',
11921191
'user_not_allowed_to_auth_to_teampass_app' => 'El usuario no tiene permitido autenticarse en la aplicación Teampass',
11931192
'user_is_not_auth_with_oauth2' => 'El usuario no debe autenticarse con Entra/Azure AD',
11941193
'highlight_favorites' => 'Resaltar favoritos',

includes/language/swedish.php

-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,6 @@
11881188
'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.',
11891189
'items_page_split_view_mode' => 'Show item details in page split view mode',
11901190
'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.',
1191-
'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD',
11921191
'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application',
11931192
'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD',
11941193
'highlight_favorites' => 'Highlight favorites',

includes/language/turkish.php

-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,6 @@
11881188
'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.',
11891189
'items_page_split_view_mode' => 'Show item details in page split view mode',
11901190
'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.',
1191-
'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD',
11921191
'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application',
11931192
'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD',
11941193
'highlight_favorites' => 'Highlight favorites',

includes/language/ukrainian.php

-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,6 @@
11881188
'show_item_data_tip' => 'Дозволяє відображати додаткову інформацію у списку елементів (ім'я користувача, електронна пошта та URL). Це може бути корисно для швидкого перегляду вмісту елемента.',
11891189
'items_page_split_view_mode' => 'Показати деталі елемента у режимі розділеного перегляду сторінки',
11901190
'replace_tenant_id' => 'Адаптувати URL, але залишити {tenant-id} як є. Він буде замінений в реальному часі на ID орендаря.',
1191-
'user_exists_but_not_oauth2' => 'Користувач повинен автентифікуватися за допомогою Entra/Azure AD',
11921191
'user_not_allowed_to_auth_to_teampass_app' => 'Користувачеві не дозволено автентифікуватися за допомогою додатку Teampass',
11931192
'user_is_not_auth_with_oauth2' => 'Користувач не повинен автентифікуватися за допомогою Entra/Azure AD',
11941193
'highlight_favorites' => 'Виділити обрані',

includes/language/vietnamese.php

-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,6 @@
11881188
'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.',
11891189
'items_page_split_view_mode' => 'Show item details in page split view mode',
11901190
'replace_tenant_id' => 'Adapt the URL but keep {tenant-id} as is. It will be replaced live by the tenant ID.',
1191-
'user_exists_but_not_oauth2' => 'User has to authenticate using Entra/Azure AD',
11921191
'user_not_allowed_to_auth_to_teampass_app' => 'User is not allowed to authenticate with Teampass application',
11931192
'user_is_not_auth_with_oauth2' => 'User should not authenticate with Entra/Azure AD',
11941193
'highlight_favorites' => 'Highlight favorites',

sources/identify.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -2229,6 +2229,9 @@ function identifyDoLDAPChecks(
22292229
int $sessionPwdAttempts
22302230
): array
22312231
{
2232+
$session = SessionManager::getSession();
2233+
$lang = new Language($session->get('user-language') ?? 'english');
2234+
22322235
// Prepare LDAP connection if set up
22332236
if ((int) $SETTINGS['ldap_mode'] === 1
22342237
&& $username !== 'admin'
@@ -2249,7 +2252,7 @@ function identifyDoLDAPChecks(
22492252
'initial_url' => isset($sessionUrl) === true ? $sessionUrl : '',
22502253
'pwd_attempts' => (int) $sessionPwdAttempts,
22512254
'error' => true,
2252-
'message' => "LDAP error: ".$retLDAP['message'],
2255+
'message' => $lang->get('error_bad_credentials'),
22532256
]
22542257
];
22552258
}
@@ -2338,7 +2341,7 @@ function shouldUserAuthWithOauth2(
23382341
// Case where user exists in Teampass but not allowed to auth with Oauth2
23392342
return [
23402343
'error' => true,
2341-
'message' => 'user_exists_but_not_oauth2',
2344+
'message' => 'error_bad_credentials',
23422345
'oauth2Connection' => false,
23432346
'userPasswordVerified' => false,
23442347
];

0 commit comments

Comments
 (0)