nilsteampassnet / TeamPass

Collaborative Passwords Manager
https://www.teampass.net
1.67k stars 546 forks source link

Internal Server Error 500 Profile Window #2373

Closed DavidCGN closed 6 years ago

DavidCGN commented 6 years ago
### Steps to reproduce 1. Creating an User 2. Log In with that User 3. Go to the Profile Window ### Expected behaviour The Window should open and I can choose some options (change password language etc.) ### Actual behaviour all users are getting an Internal Server Error 500 popup. You can click it away and it seems like nothing is wrong. Just the Error Message pops up and the functions in the Window are still working ### Server configuration **Operating system**: CentOS 7 **Web server:** Apache 2.4.6 **Database:** MariaDB 5.5.56 **PHP version:** 7.2 **Teampass version:** 2.1.27.17 **Teampass configuration file:** **Updated from an older Teampass or fresh install:** PLEASE attach to this issue the file `/includes/config/tp.config.php`. Fresh Installation ### Client configuration **Browser:** FireFox, Chrome **Operating system:** Windows 10 ### Logs #### Web server error log ``` Insert your webserver log here ``` #### Log from the web-browser developer console (CTRL + SHIFT + i) ``` Insert the log here and especially the answer of the query that failed. ``` [php7:error] [pid 14157] PHP Fatal error: Uncaught InvalidArgumentException: Expected positive integer in /var/www/html/teampass/includes/libraries/PasswordGenerator/Generator /ComputerPasswordGenerator.php:128\nStack trace:\n#0 /var/www/html/teampass/sour ces/main.queries.php(1007): PasswordGenerator\\Generator\\ComputerPasswordGenera tor->setLength(0)\n#1 /var/www/html/teampass/sources/main.queries.php(53): mainQ uery()\n#2 {main}\n thrown in /var/www/html/teampass/includes/libraries/Passwor dGenerator/Generator/ComputerPasswordGenerator.php on line 128, referer: http:// test.local/teampass/index.php?page=items
ImNtReal commented 6 years ago

I'm getting the same error while trying to save or generate passwords on a freshly updated 2.1.27.17 from 2.1.27.7.

comessoon commented 6 years ago

I'm getting the same error while trying to save or generate passwords on a freshly Installation 2.1.27.7

ImNtReal commented 6 years ago

I found the issue. In line 1007 of sources/main.queries.php, the variable length is used when is should be size. Change: $generator->setLength((int) filter_input(INPUT_POST, 'length', FILTER_SANITIZE_NUMBER_INT)); to: $generator->setLength((int) filter_input(INPUT_POST, 'size', FILTER_SANITIZE_NUMBER_INT));

nilsteampassnet commented 6 years ago

Yes absolutely.

It seems I made this change over one night after performing a copy-paste.

I will change this and commit a new release.

nilsteampassnet commented 6 years ago

Please reopen this ticket on need.

iJoey22 commented 2 years ago

Hello, i'm getting the same issue when trying to copy the password. I'm new in linux and trying to get teampass work. Can you please help me with this? POST http://teampass.chaco.com.bo/sources/items.queries.php 500 (Internal Server Error)