Project

General

Profile

Actions

Bug #82799

closed

Exception on editing a FileStorage in FileList Module using PostgreSQL

Added by Stephan Großberndt about 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Category:
Backend API
Target version:
Start date:
2017-10-18
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Yes
Sprint Focus:
On Location Sprint

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.

Actions #1

Updated by Stephan Großberndt about 7 years ago

  • Description updated (diff)
Actions #2

Updated by Gerrit Code Review about 7 years ago

  • Status changed from In Progress to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54436

Actions #3

Updated by Gerrit Code Review about 7 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54436

Actions #4

Updated by Susanne Moog almost 7 years ago

  • Sprint Focus set to On Location Sprint
Actions #5

Updated by Gerrit Code Review almost 7 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54785

Actions #6

Updated by Stephan Großberndt almost 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #7

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF