Issue Bug Closed

#82799Exception on editing a FileStorage in FileList Module using PostgreSQL

Stephan Großberndt 10/18/17, 15:50 updated 10/02/18, 10:56

Description

Open the FileListe module in TYPO3 v9 and v8.7 and try to edit a sys_file_storage by clicking on the icon in the tree and selecting “edit” when using a PostgreSQL database.
The backend form for the sys_file_storage does not open, instead you get an exception:

An exception occurred while executing 'SELECT "uid", "pid" FROM "sys_file_storage" WHERE ("uid" = ?) AND ("sys_file_storage"."deleted" = 0)' with params ["1:\/"]: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid syntax for integer: »1:/«

This is due to the wrong uid 1:/ instead of 1 being passed to EditDocumentController in /typo3/index.php?route=/record/edit&edit[sys_file_storage][1:/]=edit and a missing sanitation in BackendUtility.

This bug does not happen on MySQL as there the parameter is casted by MySQL to integer:

SELECT uid FROM sys_file_storage WHERE uid='1:/';

works without issues on MySQL and fails on PostgreSQL.

Reviews 2