nilsteampassnet / TeamPass

Collaborative Passwords Manager
https://www.teampass.net
1.63k stars 532 forks source link

User Creation Overwrites Existing User #4139

Open samnitall opened 2 months ago

samnitall commented 2 months ago

Thanks for reporting issues back to Teampass! This is ONLY for ISSUE / DEFECT / BUG.

IN CASE OF DEFECT, THIS TEMPLATE HAS TO BE FOLLOWED. IF NOT, I WILL DELETE THE TICKET WITHOUT ANSWERING IT!

For QUESTIONS or REMARKS, please use https://github.com/nilsteampassnet/TeamPass/discussions

To make it possible for us to help you please fill out below information carefully.

Steps to reproduce

  1. Log in as administrator, access users menu
  2. Click "New" to create a new user
  3. Right click on "Users" menu item in left menu, open link in new tab
  4. Edit existing user (to review settings)
  5. Close edit user tab, return to new user tab. Create new user.

Expected behaviour

New user should be created. Existing user left untouched.

Actual behaviour

New user will not be generated. Existing user that was viewed name and email address will be updated.

Server configuration

Operating system: Linux 5.14.0-362.24.1.el9_3.0.1.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Apr 4 22:31:43 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux (Rocky Linux 9.3)

Web server: Server version: Apache/2.4.57 (Rocky Linux) Server built: Jul 20 2023 00:00:00

Currently no SSL is installed.

Database: mysql Ver 15.1 Distrib 10.5.22-MariaDB, for Linux (x86_64) using EditLine wrapper

PHP version: PHP 8.2.18 (cli) (built: Apr 9 2024 18:46:23) (NTS gcc x86_64) Copyright (c) The PHP Group Zend Engine v4.2.18, Copyright (c) Zend Technologies with Zend OPcache v8.2.18, Copyright (c), by Zend Technologies

Teampass version: version 3.1.2

Teampass configuration file: tp.config.txt

Updated from an older Teampass or fresh install: Updated from older version. PLEASE attach to this issue the file /includes/config/tp.config.php.

Client configuration

Browser: Firefox 124.0.2 (64-bit)

Operating system: Windows 10 21H2

Logs

Web server error log

Nothing that appears relevant; we rebooted php-fpm and httpd after to make sure the user editing was not caching-related.

php-fpm/www-error.log
[16-Apr-2024 10:17:58 America/New_York] TEAMPASS - Folder: 21 - User: 10000001 -                                                                                                                                                              access: W - edit: 1 - delete:
[16-Apr-2024 10:18:31 America/New_York] TEAMPASS Error - admin page - Error when                                                                                                                                                              trying to read crontab : You (apache) are not allowed to access to (crontab) be                                                                                                                                                             cause of pam configuration.

php-fpm/error.log
[16-Apr-2024 10:11:10] NOTICE: fpm is running, pid 929
[16-Apr-2024 10:11:10] NOTICE: ready to handle connections
[16-Apr-2024 10:11:10] NOTICE: systemd monitor interval set to 10000ms

httpd/error_log
[Tue Apr 16 10:11:10.881236 2024] [mpm_event:notice] [pid 921:tid 921] AH00489: Apache/2.4.57 (Rocky Linux) OpenSSL/3.0.7 configured -- resuming normal operations
[Tue Apr 16 10:11:10.881254 2024] [core:notice] [pid 921:tid 921] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

Log from the web-browser developer console (CTRL + SHIFT + i)

No queries failed, so I'm not sure what to share.

XHRPOST
http://$SERVER_ADDR/sources/main.queries.php
[HTTP/1.1 200 OK 26ms]

XHRPOST
http://$SERVER_ADDR/sources/users.queries.php
[HTTP/1.1 200 OK 12ms]

XHRGET
http://$SERVER_ADDR/sources/users.datatable.php?draw=2&columns[0][data]=0&columns[0][name]=&columns[0][searchable]=true&columns[0][orderable]=true&columns[0][search][value]=&columns[0][search][regex]=false&columns[1][data]=1&columns[1][name]=&columns[1][searchable]=true&columns[1][orderable]=true&columns[1][search][value]=&columns[1][search][regex]=false&columns[2][data]=2&columns[2][name]=&columns[2][searchable]=true&columns[2][orderable]=true&columns[2][search][value]=&columns[2][search][regex]=false&columns[3][data]=3&columns[3][name]=&columns[3][searchable]=true&columns[3][orderable]=true&columns[3][search][value]=&columns[3][search][regex]=false&columns[4][data]=4&columns[4][name]=&columns[4][searchable]=true&columns[4][orderable]=true&columns[4][search][value]=&columns[4][search][regex]=false&columns[5][data]=5&columns[5][name]=&columns[5][searchable]=true&columns[5][orderable]=true&columns[5][search][value]=&columns[5][search][regex]=false&columns[6][data]=6&columns[6][name]=&columns[6][searchable]=true&columns[6][orderable]=true&columns[6][search][value]=&columns[6][search][regex]=false&columns[7][data]=7&columns[7][name]=&columns[7][searchable]=true&columns[7][orderable]=true&columns[7][search][value]=&columns[7][search][regex]=false&columns[8][data]=8&columns[8][name]=&columns[8][searchable]=true&columns[8][orderable]=true&columns[8][search][value]=&columns[8][search][regex]=false&order[0][column]=1&order[0][dir]=asc&start=0&length=10&search[value]=&search[regex]=false&display_warnings=false&_=1713280805418
[HTTP/1.1 200 OK 28ms]