Issue Bug Closed

#97864file mount directory classified as file, if the directory name has point

Anonymous 07/07/22, 06:08 updated 10/02/26, 19:44

Description

file mount directory e.g. “test.com” will be classified as file, if the directory name has point.

TYPO3:
  CMS:
    Form:
      persistenceManager:
        allowedFileMounts:
          100: '1:/test.com/'

The problem is using pathinf() to check if $persistencePath is a file or a directory, in …/typo3/sysext/form/Classes/Mvc/Persistence/FormPersistenceManager.php

    public function isAllowedPersistencePath(string $persistencePath): bool
    {
        $pathinfo = PathUtility::pathinfo($persistencePath);
        $persistencePathIsFile = isset($pathinfo['extension']);
        ...

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 2

  1. Georg Ringer commented and changed status New Closed <span data-processor="relativetime" data-value="2026-10-02T19:44:44+00:00" > 10/02/26, 19:44 </span>

    I checked the current state of all branches:

    v14

    The storage handling of EXT:form has been reworked with the introduction of the database storage (Feature: #108653 – Database storage for form extension). File mount handling now lives in FileMountStorageAdapter, which uses separate checks for folders (isAllowedStorageLocation()) and form definition files (isAllowedPersistenceIdentifier()). The file/folder detection via pathinfo() is gone, so a file mount like 1:/test.com/ is no longer mistaken for a file.

    main (v15)

    The file based form storage has been deprecated in v14.2 (Deprecation: #108653 – Form file-based storage deprecated) and removed in main. persistenceManager.allowedFileMounts is only used by the upgrade wizard that migrates existing file based forms to the database, and it does not use the extension based check.

    v13 (13.4)

    The affected code still exists in 13.4. As the issue is an edge case with an easy workaround (a folder name without a dot) and is solved in all newer versions, there won’t be a fix for 13.4.

    I’m closing the issue. Feel free to comment if anything is missing.