#94562Link field - insufficiently checked input leads to reference index error
Description
Description:
Editors try to enter a phone number without using the wizard next to the link field. This causes errors like the following when saving the content element and also during referenceindex:update.
An exception occurred while executing ‘INSERT INTO `sys_refindex` (`tablename`, `recuid`, `field`, `flexpointer`, `softref_key`, `softref_id`, `sorting`, `deleted`, `workspace`, `ref_table`, `ref_uid`, `ref_string`, `hash`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’ with params [“sys_file_reference”, 273664,
“link”, “”, “typolink”, “091c6845bc9ae493200c100e8a92c110:0”, -1, 0, 0, “pages”, 1234567890, “”, “27a9027f6e7866acd34f158860fc865d”]:
Out of range value for column ‘ref_uid’ at row 1
This occures in TYPO3 10 and TYPO3 11.
To reproduce this problem
- Create a content element (with image field).
- In the file reference / image use the link field or use the content element link field and enter 012345678910.
- Optional: start the cli -> referenceindex:update
The number is interpreted as a content id / ref_uid.
Reviews 6
- 12.4 87111[BUGFIX] Verify softref ref_uid target in refindex
- 13.4 87110[BUGFIX] Verify softref ref_uid target in refindex
- main 87101[BUGFIX] Verify softref ref_uid target in refindex
- 13.4 87104[BUGFIX] Prevent BackendUtility::getRecord() postgresql out of range
- 12.4 87105[BUGFIX] Prevent BackendUtility::getRecord() postgresql out of range
- main 87103[BUGFIX] Prevent BackendUtility::getRecord() postgresql out of range
Related issues 2
History 1116
-
Sybille Peters commented <span data-processor="relativetime" data-value="2021-10-25T19:05:00+00:00" > 10/25/21, 19:05 </span>
-
Dennis Metz commented <span data-processor="relativetime" data-value="2022-05-30T07:43:01+00:00" > 05/30/22, 07:43 </span>
I have the same problem with a pure link field in a separate table.
Here, too, an attempt is made to make an ID out of the telephone number.'link' => [ 'exclude' => false, 'label' => 'LINKFELD', 'config' => [ 'type' => 'input', 'renderType' => 'inputLink', 'size' => 20, 'max' => 1024, 'fieldControl' => [ 'linkPopup' => [ 'options' => [ 'title' => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.link', ], ], ], 'softref' => 'typolink', ], ], -
Riccardo De Contardi commented <span data-processor="relativetime" data-value="2024-04-07T19:47:16+00:00" > 04/07/24, 19:47 </span>
On TYPO3 12 and 13 I got an exception with the following test:
1) Create a page
2) Create a CE (e.g. CType = header)
3) paste into the Link[header_link]field the number:012345678910
4) Save itResult
An exception occurs:
(1/3) #1264 Doctrine\DBAL\Exception\DriverException An exception occurred while executing a query: Out of range value for column 'ref_uid' at row 1 in /var/www/html/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php line 117
By the way: the number is saved anyway…
You can avoid the issue by pasting in the field:
tel:012345678910It is better to pull out a message error (like: “link type not recognized” or whatever) instead of throwing an exception.
would it be a good idea that the field should validate only strings entered that begins with
t3:// http(s):// tel: mailto:
?
-
Christian Kuhn changed Related to #100934 <span data-processor="relativetime" data-value="2024-11-20T15:09:14+00:00" > 11/20/24, 15:09 </span>
-
Christian Kuhn changed Duplicated by #105525 <span data-processor="relativetime" data-value="2024-11-20T15:15:41+00:00" > 11/20/24, 15:15 </span>
-
Christian Kuhn changed Duplicates #104812 <span data-processor="relativetime" data-value="2024-11-20T15:17:56+00:00" > 11/20/24, 15:17 </span>
-
Christian Kuhn changed status
NewAccepted <span data-processor="relativetime" data-value="2024-11-20T15:19:06+00:00" > 11/20/24, 15:19 </span> -
Christian Kuhn commented <span data-processor="relativetime" data-value="2024-11-20T15:19:39+00:00" > 11/20/24, 15:19 </span>
confirmed. easy to reproduce since at least v11 to current main (v14). will have a look.
-
Gerrit Code Review pushed patch set 1 for main to change 87101 status
AcceptedUnder Review <span data-processor="relativetime" data-value="2024-11-20T15:23:03+00:00" > 11/20/24, 15:23 </span> -
Gerrit Code Review pushed patch set 2 for main to change 87101 <span data-processor="relativetime" data-value="2024-11-20T15:45:57+00:00" > 11/20/24, 15:45 </span>
-
Garvin Hicking changed Related to #105658 <span data-processor="relativetime" data-value="2024-11-20T16:31:31+00:00" > 11/20/24, 16:31 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 87101 <span data-processor="relativetime" data-value="2024-11-20T18:54:37+00:00" > 11/20/24, 18:54 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 87110 <span data-processor="relativetime" data-value="2024-11-20T19:16:08+00:00" > 11/20/24, 19:16 </span>
-
Gerrit Code Review pushed patch set 1 for 12.4 to change 87111 <span data-processor="relativetime" data-value="2024-11-20T19:30:36+00:00" > 11/20/24, 19:30 </span>
-
Christian Kuhn commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2024-11-20T20:00:09+00:00" > 11/20/24, 20:00 </span>Applied in changeset commit:220a6658757fdbc531b022054cc95927e45de38e.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-12-02T14:33:53+00:00" > 12/02/25, 14:33 </span>
I could reproduce the problem with your description in latest master (11-dev).
The exception also occurs whenever the content element is modified in any way later.