TeamPass
TeamPass copied to clipboard
Cannot reset an user password or create a new user - v3.0.0.17 upgraded from older version
Steps to reproduce
- Upgrade from older Teampass v2.1.23 to v3.0.17 through all intermediate versions.
- Try to reset a local user password.
Expected behaviour
Process of reencryption successed, password resetted and email sent to user.
Actual behaviour
Process of reencryption fail with "500 Internal Server Error" after about 90 seconds and no mail is sent to user.
Server configuration
Operating system: Linux Debian 11 5.10.0-14-amd64 #1 SMP Debian 5.10.113-1 (2022-04-29) x86_64
Web server: Apache/2.4.53 (Debian) built: 2022-03-14T16:28:35
Database: 10.5.15-MariaDB-0+deb11u1 Debian 11
PHP version: PHP 7.4.28
Teampass version: 3.0.0.17
Teampass configuration file: // DATABASE connexion parameters define("DB_HOST", "localhost"); define("DB_USER", "teampass_admin"); define("DB_PASSWD", "[redacted]"); define("DB_NAME", "teampass"); define("DB_PREFIX", "teampass_"); define("DB_PORT", "3306"); define("DB_ENCODING", "utf8"); define("DB_SSL", array( "key" => "", "cert" => "", "ca_cert" => "", "ca_path" => "", "cipher" => "" )); define("DB_CONNECT_OPTIONS", array( MYSQLI_OPT_CONNECT_TIMEOUT => 10 )); define("SECUREPATH", "/var/www/teampass/includes"); define("IKEY", ""); define("SKEY", ""); define("AKEY", ""); define("HOST", "");
Updated from an older Teampass or fresh install: Update from an older Teampass 2.1.23, including all intermediate updates to version 3.0.0.17
'max_latest_items' => '10',
'enable_favourites' => '1',
'show_last_items' => '1',
'enable_pf_feature' => '0',
'log_connections' => '1',
'log_accessed' => '1',
'time_format' => 'H:i:s',
'date_format' => 'd/m/Y',
'duplicate_folder' => '0',
'item_duplicate_in_same_folder' => '0',
'duplicate_item' => '1',
'number_of_used_pw' => '3',
'manager_edit' => '1',
'cpassman_dir' => '/var/www/teampass',
'cpassman_url' => 'https://[redacted]',
'favicon' => 'https://[redacted]/favicon.ico',
'path_to_upload_folder' => '/var/www/teampass/upload',
'url_to_upload_folder' => 'https://[redacted]/upload',
'path_to_files_folder' => '/var/www/teampass/files',
'url_to_files_folder' => 'https://[redacted]/files',
'activate_expiration' => '0',
'pw_life_duration' => '0',
'maintenance_mode' => '0',
'enable_sts' => '0',
'encryptClientServer' => '1',
'cpassman_version' => '3.0.0.17',
'ldap_mode' => '0',
'ldap_type' => '0',
'ldap_suffix' => '0',
'ldap_domain_dn' => '0',
'ldap_domain_controler' => '0',
'ldap_user_attribute' => '0',
'ldap_ssl' => '0',
'ldap_tls' => '0',
'ldap_elusers' => '0',
'richtext' => '0',
'allow_print' => '1',
'roles_allowed_to_print' => '["6"]',
'show_description' => '1',
'anyone_can_modify' => '1',
'anyone_can_modify_bydefault' => '0',
'nb_bad_authentication' => '5',
'utf8_enabled' => '1',
'restricted_to' => '0',
'restricted_to_roles' => '0',
'enable_send_email_on_user_login' => '1',
'enable_user_can_create_folders' => '0',
'insert_manual_entry_item_history' => '0',
'enable_kb' => '1',
'enable_email_notification_on_item_shown' => '1',
'enable_email_notification_on_user_pw_change' => '1',
'custom_logo' => 'https://[redacted]/logo.svg',
'custom_login_text' => '',
'default_language' => 'english',
'send_stats' => '0',
'get_tp_info' => '1',
'send_mail_on_user_login' => '0',
'nb_items_by_query' => 'auto',
'enable_delete_after_consultation' => '0',
'enable_personal_saltkey_cookie' => '0',
'personal_saltkey_cookie_duration' => '31',
'email_smtp_server' => '[redacted]',
'email_smtp_auth' => '1',
'email_auth_username' => '[redacted]',
'email_auth_pwd' => '[redacted]',
'email_port' => '587',
'email_security' => 'tls',
'email_server_url' => 'https://[redacted]',
'email_from' => '[redacted]',
'email_from_name' => '[redacted]',
'pwd_maximum_length' => '40',
'delay_item_edition' => '0',
'allow_import' => '0',
'proxy_ip' => '',
'proxy_port' => '',
'upload_maxfilesize' => '10mb',
'upload_docext' => 'doc,docx,dotx,xls,xlsx,xltx,rtf,csv,txt,pdf,ppt,pptx,pot,dotx,xltx',
'upload_imagesext' => 'jpg,jpeg,gif,png',
'upload_pkgext' => '7z,rar,tar,zip',
'upload_otherext' => 'sql,xml',
'upload_imageresize_options' => '1',
'upload_imageresize_width' => '800',
'upload_imageresize_height' => '600',
'upload_imageresize_quality' => '90',
'use_md5_password_as_salt' => '0',
'ga_website_name' => 'TeamPass for ChangeMe',
'api' => '0',
'subfolder_rights_as_parent' => '1',
'show_only_accessible_folders' => '0',
'enable_suggestion' => '0',
'otv_expiration_period' => '7',
'default_session_expiration_time' => '10',
'send_stats_time' => '0',
'tree_counters' => '0',
'item_extra_fields' => '1',
'enable_attachment_encryption' => '1',
'copy_to_clipboard_small_icons' => '0',
'timezone' => 'Europe/Rome',
'settings_offline_mode' => '0',
'offline_key_level' => '60',
'bck_script_filename' => 'bck_cpassman',
'bck_script_path' => '/var/www/teampass/backups',
'can_create_root_folder' => '0',
'menu_type' => 'context',
'duo' => '0',
'encryption_protocol' => 'ctr',
'google_authentication' => '0',
'enable_server_password_change' => '0',
'syslog_enable' => '1',
'syslog_host' => 'localhost',
'syslog_port' => '514',
'saltkey_ante_2127' => '13',
'teampass_version' => '2.1.27',
'migration_to_2127' => 'done',
'manager_move_item' => '0',
'create_item_without_password' => '0',
'send_statistics_items' => 'stat_country;stat_users;stat_items;stat_items_shared;stat_folders;stat_folders_shared;stat_admins;st',
'agses_authentication_enabled' => '0',
'personal_saltkey_security_level' => '0',
'ldap_new_user_is_administrated_by' => '0',
'ldap_port' => '389',
'enable_http_request_login' => '0',
'otv_is_enabled' => '0',
'ldap_and_local_authentication' => '0',
'secure_display_image' => '1',
'upload_zero_byte_file' => '0',
'upload_all_extensions_file' => '0',
'files_with_defuse' => 'done',
'admin_2fa_required' => '1',
'password_overview_delay' => '4',
'roles_allowed_to_print_select' => '',
'clipboard_life_duration' => '30',
'mfa_for_roles' => '',
'settings_tree_counters' => '0',
'enable_massive_move_delete' => '0',
'email_debug_level' => '0',
'ga_reset_by_user' => '',
'onthefly-backup-key' => '[redacted]',
'onthefly-restore-key' => '',
'ldap_user_dn_attribute' => '',
'ldap_dn_additional_user_dn' => '',
'ldap_user_object_filter' => '',
'ldap_bdn' => '',
'ldap_hosts' => '',
'ldap_password' => '',
'ldap_username' => '',
'bck_script_passkey' => '[redacted]',
Client configuration
Browser: Chrome v102.0.5005.63 Edge v102.0.1245.39 Firefox v101.0.1
Operating system: Windows 10
Logs
Web server error log
[Fri Jun 10 11:24:32.621041 2022] [php7:error] [pid 5390] [client [redacted]:31835] PHP Fatal error: Uncaught TypeError: Argument 1 passed to decryptUserObjectKey() must be of the type string, null given, called in /var/www/teampass/sources/main.queries.php on line 1987 and defined in /var/www/teampass/sources/main.functions.php:2738\nStack trace:\n#0 /var/www/teampass/sources/main.queries.php(1987): decryptUserObjectKey()\n#1 /var/www/teampass/sources/main.queries.php(1762): continueReEncryptingUserSharekeysStep2()\n#2 /var/www/teampass/sources/main.queries.php(397): continueReEncryptingUserSharekeys()\n#3 /var/www/teampass/sources/main.queries.php(152): keyHandler()\n#4 /var/www/teampass/sources/main.queries.php(74): mainQuery()\n#5 {main}\n thrown in /var/www/teampass/sources/main.functions.php on line 2738, referer: https://[redacted]/index.php?page=users
Log from the web-browser developer console (CTRL + SHIFT + i)
Reencryption based upon admin decision to change user auth password [index.php:1668:17](https://[redacted]/index.php?page=users)
USER SHAREKEYS RE-ENCRYPTION START [index.php:2434:17](https://[redacted]/index.php?page=users)
Performing step1 [index.php:2491:17](https://[redacted]/index.php?page=users)
Performing step1 [index.php:2491:17](https://[redacted]/index.php?page=users)
Performing step1 [index.php:2491:17](https://[redacted]/index.php?page=users)
Performing step1 [index.php:2491:17](https://[redacted]/index.php?page=users)
Performing step1 [index.php:2491:17](https://[redacted]/index.php?page=users)
Performing step2 [index.php:2491:17](https://[redacted]/index.php?page=users)
XHR POST https://[redacted]/sources/main.queries.php [HTTP/1.0 500 Internal Server Error 5ms]
Request headers:
POST /sources/main.queries.php HTTP/1.0
Host: [redacted]
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0
Accept: */*
Accept-Language: it-IT,it;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate, br
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Content-Length: 211
Origin: https://[redacted]
Connection: keep-alive
Referer: https://[redacted]/index.php?page=users
Cookie: _ga_5RW3C3F8M3=GS1.1.1640260405.3.1.1640260424.0; _ga=GA1.2.56509336.1640249290; jstree_select=51; teampass_session=t607p798r3ndior1jccvs0efur; 8932641f813eb1e4cd9cb42e268d409bb8b4bf19dc5b954e22=ca97acf9ac015df809388482ae2e6599ee3a8eec1bc10046cb
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
Request data:
type=user_sharekeys_reencryption_next&type_category=action_key&data=iAHNM8gVo2Jdk86PnChYf2pmFWIZoYbfQ%2BqVNd5VagZa6t2mk0vNREuWrVz4zns6WgyF0XP3H66fdoutjBA%3D&key=b6EFLWHGETDjmqWR5995LvuQN3buyFnA2mK3eHL3LEKZTVpr7K
Response headers:
HTTP/1.0 500 Internal Server Error
Date: Fri, 10 Jun 2022 09:58:30 GMT
Server: Apache/2.4.53 (Debian)
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-cache, must-revalidate
Pragma: no-cache
Content-Length: 3
Connection: close
Content-Type: text/html; charset=utf-8
Response data:
null
Same issue for me following the upgrade from 2.1.27.36 to 3.0.0.17.
We still cannot create new users or change their passwords... Is there any chance of installing from scratch and importing the old data?