TeamPass icon indicating copy to clipboard operation
TeamPass copied to clipboard

Upload attachment error

Open jofrey007 opened this issue 1 year ago • 4 comments

Steps to reproduce

  1. In Option I enabled all types of file extensions
  2. Select file (in my case LP1.pem file)
  3. Click to Start upload

Expected behaviour

File is attached to selected item

Actual behaviour

File is not attached and apache error message [Fri Mar 31 14:09:04.650970 2023] [php:error] [pid 107731] [client 10.30.0.60:52594] PHP Fatal error: Uncaught TypeError: htmlentities(): Argument #1 ($string) must be of type string, int given in /var/www/teampass/sources/upload.attachments.php:461\nStack trace:\n#0 /var/www/teampass/sources/upload.attachments.php(461): htmlentities()\n#1 /var/www/teampass/sources/upload.attachments.php(244): handleAttachmentError()\n#2 {main}\n thrown in /var/www/teampass/sources/upload.attachments.php on line 461, referer: https://teampass.irsys.sk/index.php?page=items

Server configuration

Operating system: Debian 11

Web server: Apache

**Database:**10.5.18-MariaDB-0+deb11u1

**PHP version:**8.1.16

Teampass version: 3.0.0.23

Teampass configuration file:

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

Client configuration

**Browser:**Chrome

**Operating system:**Windows

Logs

Web server error log

[Fri Mar 31 14:09:04.650970 2023] [php:error] [pid 107731] [client 10.30.0.60:52594] PHP Fatal error:  Uncaught TypeError: htmlentities(): Argument #1 ($string) must be of type string, int given in /var/www/teampass/sources/upload.attachments.php:461\nStack trace:\n#0 /var/www/teampass/sources/upload.attachments.php(461): htmlentities()\n#1 /var/www/teampass/sources/upload.attachments.php(244): handleAttachmentError()\n#2 {main}\n  thrown in /var/www/teampass/sources/upload.attachments.php on line 461, referer: https://teampass.irsys.sk/index.php?page=items

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

Insert the log here and especially the answer of the query that failed.

jofrey007 avatar Mar 31 '23 12:03 jofrey007