Issue Bug Closed

#102619CKEditor: file_exists(): open_basedir restriction in effect. File(/_assets/.../Css/editor.css)

Christian Ludwig 12/06/23, 19:52 updated 07/09/24, 15:12

Description

The sys log gets flooded by those errors when opening a content element that includes the CKEditor (v12.4.8)

Core: Error handler (BE): PHP Warning: file_exists(): open_basedir restriction in effect. File(/_assets/xyz/Css/editor.css) is not within the allowed path(s): (/var/www/vhosts/my-website/:/tmp/) in /var/www/vhosts/my-website/vendor/typo3/cms-core/Classes/Utility/GeneralUtility.php line 2162

The original css file is located in /var/www/vhosts/my-website/vendor/typo3/cms-rte-ckeditor/Resources/Public/Css/editor.css and “_assets/xyz” is the symlink to the CKEditor’s public folder.

The file path is returned as part of the array of TYPO3\CMS\RteCKEditor\Form\Element\RichTextElement::render().

$resultArray['stylesheetFiles'][] = PathUtility::getPublicResourceWebPath('EXT:rte_ckeditor/Resources/Public/Css/editor.css');

Reviews 2

History 68

  1. Chris Müller commented and changed status New Needs Feedback 12/08/23, 14:54

    What is your open_basedir configuration?

  2. Christian Ludwig commented 12/08/23, 17:43

    It is /var/www/vhosts/my-website/:/tmp/, what is correct.
    But the css is searched in /_assets/ what is wrong, it should be /var/www/vhosts/my-website/public/_assets/

  3. Chris Müller changed status Needs Feedback New 12/08/23, 18:15

  4. Daniel Siepmann commented and changed assigned to Daniel Siepmann 12/11/23, 08:38

    We have the same issue. I’ll provide a patch.

    This can also be verified with default TYPO3 settings and networkpanel. TYPO3 would add the proper versioning to the URL if everything works as expected. That way one can test without needing to set up the restriction.

  5. Gerrit Code Review pushed patch set 1 for main to change 82166 status New Under Review 12/11/23, 08:46

  6. Gerrit Code Review pushed patch set 1 for 12.4 to change 82120 12/11/23, 16:06

  7. Daniel Siepmann commented and changed status Under Review Resolved done 0 % 100 % 12/11/23, 16:30

    Applied in changeset commit:d3b26dc0986620f71354289f5d7aeab1da1be1b8.

  8. Benni Mack changed status Resolved Closed 07/09/24, 15:12