netresearch / t3x-rte_ckeditor_image

Image support in CKEditor for the TYPO3 ecosystem
GNU Affero General Public License v3.0
56 stars 65 forks source link

Error when headline-tag in RTE #160

Closed matin73 closed 10 months ago

matin73 commented 2 years ago

I got error in latest version for TYPO3 11 when i add h1, h2, ... in RTE field:

(1/1) #1320286857 TYPO3\CMS\Core\Resource\Exception\InvalidPathException
File /<h1>dsfa</h1> <p>aa</p> is not valid (".." and "//" is not allowed in path).
in /typo3/sysext/core/Classes/Resource/Driver/AbstractHierarchicalFilesystemDriver.php line 53

        // filePath must be valid
        // Special case is required by vfsStream in Unit Test context
        if (!$this->isPathValid($filePath) && strpos($filePath, 'vfs://') !== 0) {
            throw new InvalidPathException('File ' . $filePath . ' is not valid (".." and "//" is not allowed in path).', 1320286857);
        }
        return $filePath;
    }

at TYPO3\CMS\Core\Resource\Driver\AbstractHierarchicalFilesystemDriver->canonicalizeAndCheckFilePath('/<h1>dsfa</h1> <p>aa</p>')
in l/typo3/sysext/core/Classes/Resource/Driver/AbstractHierarchicalFilesystemDriver.php line 68

     */
    protected function canonicalizeAndCheckFileIdentifier($fileIdentifier)
    {
        if ($fileIdentifier !== '') {
            $fileIdentifier = $this->canonicalizeAndCheckFilePath($fileIdentifier);
            $fileIdentifier = '/' . ltrim($fileIdentifier, '/');
            if (!$this->isCaseSensitiveFileSystem()) {
                $fileIdentifier = mb_strtolower($fileIdentifier, 'utf-8');
            }
matin73 commented 2 years ago

error allways occures if any other tag than image is included. f.ex.

<p>text</p>

also has error

ngolatka commented 11 months ago

Hello @matin73 , sorry for the late response.

Can you say if this issue is still relevant? In TYPO3 12, the section around /typo3/sysext/core/Classes/Resource/Driver/AbstractHierarchicalFilesystemDriver.php line 53 has been changed, which makes me wonder if the problem still exists or not.

Can you confirm?

Gitsko commented 10 months ago

@matin73 please try the latest version of the extension, I would close the issue, if the problem still exists please open the issue again.