Bad Code in new Generation OTP
Server configuration:
Ubuntu 22.04 LTS Docker Alpine Linux v3.18 PHP version: 8.2.7 DB: 10.11.8-MariaDB Teampass versions: 3.1.4.20
Settings:
MariaDB [teampass]> select * from teampass_misc where type='admin';
+-------+---------------------------------------------+------------------------------------------------------------------------------------------------------+--------------+------------+------------+--------------+
| type | intitule | valeur | increment_id | created_at | updated_at | is_encrypted |
+-------+---------------------------------------------+------------------------------------------------------------------------------------------------------+--------------+------------+------------+--------------+
| admin | max_latest_items | 10 | 1 | NULL | NULL | 0 |
| admin | enable_favourites | 1 | 2 | NULL | NULL | 0 |
| admin | show_last_items | 1 | 3 | NULL | NULL | 0 |
| admin | enable_pf_feature | 1 | 4 | NULL | NULL | 0 |
| admin | log_connections | 1 | 5 | NULL | NULL | 0 |
| admin | log_accessed | 1 | 6 | NULL | NULL | 0 |
| admin | time_format | H:i:s | 7 | NULL | NULL | 0 |
| admin | date_format | d/m/Y | 8 | NULL | NULL | 0 |
| admin | duplicate_folder | 0 | 9 | NULL | NULL | 0 |
| admin | item_duplicate_in_same_folder | 0 | 10 | NULL | NULL | 0 |
| admin | duplicate_item | 0 | 11 | NULL | NULL | 0 |
| admin | number_of_used_pw | 3 | 12 | NULL | NULL | 0 |
| admin | manager_edit | 1 | 13 | NULL | NULL | 0 |
| admin | cpassman_dir | /var/www/html | 14 | NULL | NULL | 0 |
| admin | cpassman_url | https://xxxxxxxxxxxxxxxxxxxxxxxx | 15 | NULL | 1747990109 | 0 |
| admin | favicon | https://xxxxxxxxxxxxxxxxxxxxxxxx/favicon.ico | 16 | NULL | 1747990111 | 0 |
| admin | path_to_upload_folder | /var/www/html/upload | 17 | NULL | NULL | 0 |
| admin | url_to_upload_folder | https://xxxxxxxxxxxxxxxxxxxxxxxx/upload | 18 | NULL | NULL | 0 |
| admin | path_to_files_folder | /var/www/html/files | 19 | NULL | NULL | 0 |
| admin | url_to_files_folder | https://xxxxxxxxxxxxxxxxxxxxxxxx/files | 20 | NULL | NULL | 0 |
| admin | activate_expiration | 0 | 21 | NULL | NULL | 0 |
| admin | pw_life_duration | 0 | 22 | NULL | NULL | 0 |
| admin | maintenance_mode | 0 | 23 | NULL | NULL | 0 |
| admin | enable_sts | 0 | 24 | NULL | NULL | 0 |
| admin | encryptClientServer | 1 | 25 | NULL | NULL | 0 |
| admin | cpassman_version | 2.1.27 | 26 | NULL | NULL | 0 |
| admin | ldap_mode | 0 | 27 | NULL | 1747991412 | 0 |
| admin | ldap_type | 0 | 28 | NULL | NULL | 0 |
| admin | ldap_suffix | 0 | 29 | NULL | NULL | 0 |
| admin | ldap_domain_dn | 0 | 30 | NULL | NULL | 0 |
| admin | ldap_domain_controler | 0 | 31 | NULL | NULL | 0 |
| admin | ldap_user_attribute | 0 | 32 | NULL | NULL | 0 |
| admin | ldap_ssl | 0 | 33 | NULL | NULL | 0 |
| admin | ldap_tls | 0 | 34 | NULL | NULL | 0 |
| admin | richtext | 0 | 36 | NULL | NULL | 0 |
| admin | allow_print | 1 | 37 | NULL | NULL | 0 |
| admin | roles_allowed_to_print | ["["["["["["["["["["["["["3"]"]"]"]"]"]"]"]"]"]"]"]"] | 38 | NULL | 1736856962 | 0 |
| admin | show_description | 0 | 39 | NULL | NULL | 0 |
| admin | anyone_can_modify | 0 | 40 | NULL | NULL | 0 |
| admin | anyone_can_modify_bydefault | 0 | 41 | NULL | NULL | 0 |
| admin | nb_bad_authentication | 5 | 42 | NULL | NULL | 0 |
| admin | utf8_enabled | 1 | 43 | NULL | NULL | 0 |
| admin | restricted_to | 0 | 44 | NULL | NULL | 0 |
| admin | restricted_to_roles | 0 | 45 | NULL | NULL | 0 |
| admin | enable_send_email_on_user_login | 0 | 46 | NULL | NULL | 0 |
| admin | enable_user_can_create_folders | 0 | 47 | NULL | NULL | 0 |
| admin | insert_manual_entry_item_history | 0 | 48 | NULL | NULL | 0 |
| admin | enable_kb | 0 | 49 | NULL | NULL | 0 |
| admin | enable_email_notification_on_item_shown | 0 | 50 | NULL | NULL | 0 |
| admin | enable_email_notification_on_user_pw_change | 0 | 51 | NULL | NULL | 0 |
| admin | custom_logo | https://xxxxxxxxxxxxxxxxxxxxxxxx/Logo_aruba_it.png | 52 | NULL | 1747991455 | 0 |
| admin | custom_login_text | | 53 | NULL | 1747316891 | 0 |
| admin | default_language | english | 54 | NULL | 1737135247 | 0 |
| admin | send_stats | 0 | 55 | NULL | NULL | 0 |
| admin | get_tp_info | 1 | 56 | NULL | NULL | 0 |
| admin | send_mail_on_user_login | 0 | 57 | NULL | NULL | 0 |
| admin | nb_items_by_query | auto | 59 | NULL | NULL | 0 |
| admin | enable_delete_after_consultation | 0 | 60 | NULL | NULL | 0 |
| admin | enable_personal_saltkey_cookie | 0 | 61 | NULL | NULL | 0 |
| admin | personal_saltkey_cookie_duration | 31 | 62 | NULL | NULL | 0 |
| admin | email_smtp_server | smtp.xxxxxxxx | 63 | NULL | NULL | 0 |
| admin | email_smtp_auth | 1 | 64 | NULL | NULL | 0 |
| admin | email_auth_username | xxxxxxxxxxxxxx | 65 | NULL | NULL | 0 |
| admin | email_auth_pwd | xxxxxxxxxxxx | 66 | NULL | NULL | 1 |
| admin | email_port | 465 | 67 | NULL | NULL | 0 |
| admin | email_security | ssl | 68 | NULL | NULL | 0 |
| admin | email_server_url | | 69 | NULL | NULL | 0 |
| admin | email_from | xxxxxxxxxxxxxx | 70 | NULL | NULL | 0 |
| admin | email_from_name | TeamPass | 71 | NULL | NULL | 0 |
| admin | pwd_maximum_length | 60 | 72 | NULL | NULL | 0 |
| admin | google_authentication | 1 | 73 | NULL | NULL | 0 |
| admin | delay_item_edition | 0 | 74 | NULL | NULL | 0 |
| admin | allow_import | 1 | 75 | NULL | NULL | 0 |
| admin | proxy_ip | | 76 | NULL | NULL | 0 |
| admin | proxy_port | | 77 | NULL | NULL | 0 |
| admin | upload_maxfilesize | 10mb | 78 | NULL | NULL | 0 |
| admin | upload_docext | doc,docx,dotx,xls,xlsx,xltx,rtf,csv,txt,pdf,ppt,pptx,pot,dotx,xltx | 79 | NULL | NULL | 0 |
| admin | upload_imagesext | jpg,jpeg,gif,png | 80 | NULL | NULL | 0 |
| admin | upload_pkgext | 7z,rar,tar,zip | 81 | NULL | NULL | 0 |
| admin | upload_otherext | sql,xml | 82 | NULL | NULL | 0 |
| admin | upload_imageresize_options | 1 | 83 | NULL | NULL | 0 |
| admin | upload_imageresize_width | 800 | 84 | NULL | NULL | 0 |
| admin | upload_imageresize_height | 600 | 85 | NULL | NULL | 0 |
| admin | upload_imageresize_quality | 90 | 86 | NULL | NULL | 0 |
| admin | use_md5_password_as_salt | 0 | 87 | NULL | NULL | 0 |
| admin | ga_website_name | TeamPass 2FA | 88 | NULL | NULL | 0 |
| admin | api | 0 | 89 | NULL | NULL | 0 |
| admin | subfolder_rights_as_parent | 1 | 90 | NULL | NULL | 0 |
| admin | show_only_accessible_folders | 0 | 91 | NULL | NULL | 0 |
| admin | enable_suggestion | 0 | 92 | NULL | NULL | 0 |
| admin | otv_expiration_period | 7 | 93 | NULL | NULL | 0 |
| admin | default_session_expiration_time | 60 | 94 | NULL | NULL | 0 |
| admin | duo | 0 | 95 | NULL | NULL | 0 |
| admin | send_stats_time | 0 | 99 | NULL | NULL | 0 |
| admin | tree_counters | 0 | 100 | NULL | NULL | 0 |
| admin | item_extra_fields | 0 | 101 | NULL | NULL | 0 |
| admin | enable_attachment_encryption | 1 | 102 | NULL | NULL | 0 |
| admin | copy_to_clipboard_small_icons | 0 | 103 | NULL | NULL | 0 |
| admin | settings_offline_mode | 0 | 104 | NULL | NULL | 0 |
| admin | offline_key_level | 20 | 105 | NULL | 1737123170 | 0 |
| admin | bck_script_filename | bck_cpassman | 106 | NULL | NULL | 0 |
| admin | bck_script_path | /var/www/backup | 107 | NULL | NULL | 0 |
| admin | can_create_root_folder | 0 | 108 | NULL | NULL | 0 |
| admin | bck_script_key | xxxxxxxx | 110 | NULL | NULL | 0 |
| admin | timezone | Europe/Rome | 220 | NULL | NULL | 0 |
| admin | saltkey_ante_2127 | xxxxxxxxx | 303 | NULL | NULL | 0 |
| admin | syslog_enable | 0 | 304 | NULL | 1737123404 | 0 |
| admin | syslog_host | 10.205.2.18 | 305 | NULL | 1737123411 | 0 |
| admin | syslog_port | 514 | 306 | NULL | NULL | 0 |
| admin | ldap_object_class | 0 | 307 | NULL | NULL | 0 |
| admin | teampass_version | 3.1.4 | 308 | NULL | 1736856962 | 0 |
| admin | migration_to_2127 | done | 309 | NULL | NULL | 0 |
| admin | manager_move_item | 0 | 310 | NULL | NULL | 0 |
| admin | create_item_without_password | 0 | 311 | NULL | NULL | 0 |
| admin | send_statistics_items | stat_country;stat_users;stat_items;stat_items_shared;stat_folders;stat_folders_shared;stat_admins;st | 312 | NULL | NULL | 0 |
| admin | agses_authentication_enabled | 0 | 313 | NULL | NULL | 0 |
| admin | personal_saltkey_security_level | 0 | 314 | NULL | NULL | 0 |
| admin | ldap_new_user_is_administrated_by | 0 | 315 | NULL | 1747991408 | 0 |
| admin | ldap_port | 389 | 316 | NULL | NULL | 0 |
| admin | enable_http_request_login | 0 | 317 | NULL | NULL | 0 |
| admin | admin_2fa_required | 0 | 318 | NULL | NULL | 0 |
| admin | otv_is_enabled | 0 | 319 | NULL | NULL | 0 |
| admin | ldap_and_local_authentication | 0 | 320 | NULL | NULL | 0 |
| admin | secure_display_image | 1 | 321 | NULL | NULL | 0 |
| admin | upload_zero_byte_file | 0 | 322 | NULL | NULL | 0 |
| admin | upload_all_extensions_file | 0 | 323 | NULL | NULL | 0 |
| admin | files_with_defuse | done | 324 | NULL | NULL | 0 |
| admin | password_overview_delay | 4 | 826 | NULL | NULL | 0 |
| admin | roles_allowed_to_print_select | [] | 827 | NULL | 1742826196 | 0 |
| admin | clipboard_life_duration | 30 | 828 | NULL | NULL | 0 |
| admin | mfa_for_roles | | 829 | NULL | NULL | 0 |
| admin | settings_tree_counters | 0 | 830 | NULL | NULL | 0 |
| admin | enable_massive_move_delete | 0 | 831 | NULL | NULL | 0 |
| admin | email_debug_level | 0 | 832 | NULL | NULL | 0 |
| admin | ga_reset_by_user | | 833 | NULL | NULL | 0 |
| admin | onthefly-backup-key | xxxxx | 834 | NULL | 1738228549 | 1 |
| admin | onthefly-restore-key | | 835 | NULL | NULL | 1 |
| admin | ldap_user_dn_attribute | | 836 | NULL | NULL | 0 |
| admin | ldap_dn_additional_user_dn | | 837 | NULL | NULL | 0 |
| admin | ldap_user_object_filter | | 838 | NULL | NULL | 0 |
| admin | ldap_bdn | | 839 | NULL | NULL | 0 |
| admin | ldap_hosts | | 840 | NULL | NULL | 0 |
| admin | ldap_password | | 841 | NULL | NULL | 1 |
| admin | ldap_username | | 842 | NULL | NULL | 0 |
| admin | api_token_duration | 60 | 843 | NULL | NULL | 0 |
| admin | enable_tasks_manager | 1 | 845 | NULL | NULL | 0 |
| admin | task_maximum_run_time | 2400 | 846 | NULL | 1745920482 | 0 |
| admin | maximum_number_of_items_to_treat | 300 | 847 | NULL | 1737732214 | 0 |
| admin | tasks_manager_refreshing_period | 60 | 848 | NULL | 1736938417 | 0 |
| admin | ldap_tls_certifacte_check | LDAP_OPT_X_TLS_NEVER | 849 | NULL | NULL | 0 |
| admin | enable_tasks_log | 1 | 850 | NULL | NULL | 0 |
| admin | enable_ad_users_with_ad_groups | 0 | 851 | NULL | NULL | 0 |
| admin | enable_ad_user_auto_creation | 0 | 852 | NULL | NULL | 0 |
| admin | ldap_group_object_filter | | 853 | NULL | NULL | 0 |
| admin | ldap_guid_attibute | objectguid | 854 | NULL | NULL | 0 |
| admin | sending_emails_job_frequency | 1 | 855 | NULL | NULL | 0 |
| admin | user_keys_job_frequency | 1 | 856 | NULL | NULL | 0 |
| admin | items_statistics_job_frequency | 5 | 857 | NULL | NULL | 0 |
| admin | reload_cache_table_task | | 858 | NULL | NULL | 0 |
| admin | rebuild_config_file | | 859 | NULL | NULL | 0 |
| admin | purge_temporary_files_task | | 860 | NULL | NULL | 0 |
| admin | clean_orphan_objects_task | | 861 | NULL | NULL | 0 |
| admin | users_personal_folder_task | | 862 | NULL | NULL | 0 |
| admin | maximum_session_expiration_time | 60 | 863 | NULL | NULL | 0 |
| admin | items_ops_job_frequency | 5 | 864 | NULL | 1747995342 | 0 |
| admin | upgrade_timestamp | 1747996655 | 865 | NULL | 1736856962 | 0 |
| admin | items_statistics_job_frequency | 5 | 866 | NULL | NULL | 0 |
| admin | items_statistics_job_frequency | 5 | 867 | NULL | NULL | 0 |
| admin | items_statistics_job_frequency | 5 | 869 | NULL | NULL | 0 |
| admin | enable_refresh_task_last_execution | 1 | 870 | NULL | NULL | 0 |
| admin | items_statistics_job_frequency | 5 | 872 | NULL | NULL | 0 |
| admin | items_statistics_job_frequency | 5 | 874 | NULL | NULL | 0 |
| admin | ldap_group_objectclasses_attibute | top,groupofuniquenames | 875 | NULL | NULL | 0 |
| admin | items_statistics_job_frequency | 5 | 877 | NULL | NULL | 0 |
| admin | items_statistics_job_frequency | 5 | 1020 | NULL | NULL | 0 |
| admin | pwd_default_length | 14 | 1021 | NULL | NULL | 0 |
| admin | tasks_log_retention_delay | 60 | 1022 | NULL | 1736885767 | 0 |
| admin | oauth2_enabled | 0 | 1023 | NULL | NULL | 0 |
| admin | oauth2_client_appname | Login with Azure | 1024 | NULL | NULL | 0 |
| admin | oauth2_client_scopes | openid,profile,email | 1025 | NULL | NULL | 0 |
| admin | show_item_data | 0 | 1026 | NULL | NULL | 0 |
| admin | limited_search_default | 0 | 1027 | NULL | NULL | 0 |
| admin | highlight_selected | 0 | 1028 | NULL | NULL | 0 |
| admin | highlight_favorites | 0 | 1029 | NULL | NULL | 0 |
| admin | number_users_build_cache_tree | 20 | 1030 | NULL | 1737731012 | 0 |
| admin | items_statistics_job_frequency | 5 | 1031 | NULL | NULL | 0 |
| admin | items_statistics_job_frequency | 5 | 1033 | NULL | NULL | 0 |
| admin | items_statistics_job_frequency | 5 | 1035 | NULL | NULL | 0 |
| admin | last_cron_exec | 1747997581 | 1363 | NULL | NULL | 0 |
| admin | items_statistics_job_frequency | 5 | 1364 | NULL | NULL | 0 |
| admin | items_statistics_job_frequency | 5 | 1366 | NULL | NULL | 0 |
| admin | tasks_history_delay | 604800 | 1367 | NULL | NULL | 0 |
| admin | oauth_new_user_is_administrated_by | 0 | 1368 | NULL | NULL | 0 |
| admin | oauth_selfregistered_user_belongs_to_role | 0 | 1369 | NULL | NULL | 0 |
| admin | oauth_self_register_groups | | 1370 | NULL | NULL | 0 |
| admin | items_statistics_job_frequency | 5 | 1372 | NULL | NULL | 0 |
+-------+---------------------------------------------+------------------------------------------------------------------------------------------------------+--------------+------------+------------+--------------+
Issue: After updating from 3.1.2.174, when regenerating the OTP code (No LDAP/OAUTH2), the task seems to finish correctly, but when insert Current Password e Temporary I have "Bad Code" answer.
If try from logged user, click on the Username in the top-right --> Generate New Keys, don't ask me the temporary code but the passwords not shown.
I have the same problem after upgrading to version 3.1.4.24.
I have the same problem. Is there a workaround? At this moment I can't let new people use the teampass env. I configured a LDAP active directory. And user can login but OTP code results into bad code.
I'm having the same issue. Can anyone help?
Hello, I'm having the same issue. Can you please help us? Regards,
I tested the Teampass update from version 3.1.4.24, there were no problems with the version 3.1.4.31, starting with the version 3.1.4.31 the problem "Bad Code in new Generation OTP" occurs.
I tested the Teampass update from version 3.1.4.24, there were no problems with the version 3.1.4.31, starting with the version 3.1.4.31 the problem "Bad Code in new Generation OTP" occurs.
Good morning! I didn't quite understand.
Does the problem occur if I use version 3.1.4.24? Or does the problem occur if I install version 3.1.4.24 and update to version 3.1.4.31, and after the update, the problem disappears in version 3.1.4.31?
Hi! There is no problem in both version 3.1.4.24 and version 3.1.4.31. Starting from version 3.1.4.32 and up to 3.1.4.37, the problem reappears. The LDAP user.
I found that you can skip the step of entering a temporary password by clicking Generate New Keys. However, all passwords become unavailable:
and the Synchronize new password execution fails, as the error "User not found!" is displayed:
I found similar problems in the following issues: https://github.com/nilsteampassnet/TeamPass/issues/4880
We too are seeing this in 3.1.4.31. @nilsteampassnet is this something you are able to look into sooner rather than later? Clearly lots of people are having the same issue.
Hello I will work on it tomorrow. Hopefully I can fix reproduce and fix it.
The update from version 3.1.4.31 to version 3.1.4.38 fixed the problem with the Bad Code. But when updating from version 3.1.0, after adding a new user, all passwords are empty. It looks like the problem: https://github.com/nilsteampassnet/TeamPass/issues/4883
After upgrade to 3.1.4.41 when regenerate OTP the Bad Code issue is fixed, but now any user can't see the password
Same in Version 3.1.4.43, after Generate new OTP all Passwords are gone.