TeamPass icon indicating copy to clipboard operation
TeamPass copied to clipboard

Users Page is Blank: Argument 1 passed to cleanText() must be an instance of string Logged

Open rburkholder2305 opened this issue 8 years ago • 4 comments

Steps to reproduce

  1. Install Teampass from master.zip.
  2. Complete new setup on CentOS 7 with MariaDB.
  3. Open Users page.

Expected behaviour

A list of users (just admin) should be loaded and a new user button should be available.

Actual behaviour

Page is empty. " PHP Catchable fatal error: Argument 1 passed to cleanText() must be an instance of string, string given, called in /var/www/html/users.php on line 75 and defined in /var/www/html/sources/main.functions.php on line 2230" is logged in Apache error log.

Server configuration

Operating system: CentOS 7

Web server: HTTPD (Apache)

Database: MariaDB 5.5.56

PHP version: PHP 5.6

Teampass version: 2.1.27.12

Teampass configuration file: tp.config.zip

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

Client configuration

Browser: Chrome 66.0.3359.139

Operating system: Windows 10

Logs

Web server error log

[Thu May 03 08:40:49.042674 2018] [:error] [pid 27402] [client xxx.xxx.xxx.27:5339] PHP Catchable fatal error:  Argument 1 passed to cleanText() must be an instance of string, string given, called in /var/www/html/users.php on line 75 and defined in /var/www/html/sources/main.functions.php on line 2230, referer: http://xxx.xxx.xxx.136/index.php?page=manage_main

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

08:40:49.060 index.php?page=manage_main:61 GET http://xxx.xxx.xxx.136/index.php?page=manage_users 500 (Internal Server Error)
MenuAction @ index.php?page=manage_main:61
onclick @ index.php?page=manage_main:1551
08:40:49.194 Navigated to http://xxx.xxx.xxx.136/index.php?page=manage_users
08:40:49.983 [Violation] Forced reflow while executing JavaScript took 30ms
08:40:50.204 csrfprotector.js:146 Uncaught TypeError: Cannot read property 'value' of null
    at Object._init (csrfprotector.js:146)
    at csrfprotector_init (csrfprotector.js:172)
    at csrfprotector.js:334
_init @ csrfprotector.js:146
csrfprotector_init @ csrfprotector.js:172
(anonymous) @ csrfprotector.js:334
08:40:50.271 jquery.js:8706 XHR finished loading: POST "http://xxx.xxx.xxx.136/sources/main.queries.php".
send @ jquery.js:8706
ajax @ jquery.js:8136
jQuery.(anonymous function) @ jquery.js:8282
refreshListLastSeenItems @ index.php?page=manage_users:452
(anonymous) @ index.php?page=manage_users:1304
fire @ jquery.js:3048
fireWith @ jquery.js:3160
ready @ jquery.js:433
completed @ jquery.js:104
08:40:54.059 jquery.js:8706 XHR finished loading: POST "http://xxx.xxx.xxx.136/sources/main.queries.php".

rburkholder2305 avatar May 03 '18 12:05 rburkholder2305

Duplicate of #2239

Please download new 2.1.27.12 package and overwrite existing files

nilsteampassnet avatar May 03 '18 13:05 nilsteampassnet

resolved #2242

rburkholder2305 avatar May 03 '18 15:05 rburkholder2305

Same error, same version, fresh install.

Manager Users is blank. Cant add user.

Console error: Uncaught TypeError: Cannot read property 'value' of null at Object._init (csrfprotector.js:146) at csrfprotector_init (csrfprotector.js:172) at csrfprotector.js:334 _init @ csrfprotector.js:146 csrfprotector_init @ csrfprotector.js:172 (anonymous) @ csrfprotector.js:334

Installation in CentOS 7, MySQL, but PHP 5.6.35 (cli) (built: Mar 30 2018 08:28:49)

LUiZiNH0 avatar May 11 '18 15:05 LUiZiNH0

Workaround

In file: /var/www/html/teampass/sources/main.functions.php Line: 2231 Original: function cleanText(string $string, $type = null ) Change to: function cleanText()

Options to add, manage, exclude set roles, etc... is working. But this is not a solution.

LUiZiNH0 avatar May 11 '18 15:05 LUiZiNH0