Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open_basedir problem when inserting image in RTE #261

Closed
wtfred opened this issue Dec 18, 2023 · 2 comments
Closed

open_basedir problem when inserting image in RTE #261

wtfred opened this issue Dec 18, 2023 · 2 comments

Comments

@wtfred
Copy link

wtfred commented Dec 18, 2023

Bug description
When inserting image in RTE, when saving content, we got a 503 error because of open_basedir restriction.
We are using Plesk default php settings with open_basedir set.
I don't know since when this problem exists, because it's on a website that is not so active. We updated it from TYPO 10 to 11 in may this year, and last update to 11.5.33 in november.

Steps to reproduce
To reproduce the problem:

  1. Open content
  2. Insert image
  3. Validate "image properties" modale
  4. Save content
  5. Got 503 in TYPO3 backend

Screenshots or logs

Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1476107295: PHP Warning: is_file(): open_basedir restriction in effect. File(/fileadmin/user_upload/subdirectory/Image.jpg) is not within the allowed path(s): (/var/www/vhosts/domain.com/:/tmp/) in /var/www/vhosts/domain.com/httpdocs/releases/20231116103330/public/typo3conf/ext/rte_ckeditor_image/Classes/Database/RteImagesDbHook.php line 141

Environment

  • TYPO3 version: 11.5.33
  • PHP version: 8.1.26
  • Extension version: 11.0.14

==> Potential fix ?
Change line 136 in rte_ckeditor_image/Classes/Database/RteImagesDbHook.php to

$imageSource = trim($attribArray['src'] ?? '', '/ ');

in order to get rid of the initial /

@linawolf
Copy link

I am having the same problem on opening existing records

@Gitsko
Copy link
Contributor

Gitsko commented Feb 1, 2024

Hi @wtfred, we fix the problem with the merge request from @linawolf. Please check the new version, v11.0.15.

Thanks @linawolf 🚀

@Gitsko Gitsko closed this as completed Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants