You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Class TYPO3\CMS\Core\Resource\Security\FileNameValidator does not
handle a custom file deny pattern in __construct() anymore. The
service is now stateless and can be injected without side effects.
Impact
A custom partial regex as first constructor argument when instantiating
the service is ignored. The service relies on $GLOBALS['TYPO3_CONF_VARS']['BE']['fileDenyPattern'] configuration,
and a hard coded constant as fallback.
Affected installations
Instances with custom extensions using GeneralUtility::makeInstance(FileNameValidator::class, 'some-custom-pattern');
are affected. This is most likely a very rare case.
Migration
Extensions that need to test with custom patterns that can not be
declared globally using $GLOBALS['TYPO3_CONF_VARS']['BE']['fileDenyPattern'] should probably
switch to an own service implementing the test, or inline the code. The
main worker code of the service is just four lines of code.
PHP-API, NotScanned, ext:core
The text was updated successfully, but these errors were encountered:
Breaking: #105733 - FileNameValidator no longer accepts custom regex in __construct()
https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/14.0/Breaking-105733-FileNameValidatorNoLongerAcceptsCustomRegexIn__construct.html
Breaking: #105733 - FileNameValidator no longer accepts custom regex in __construct()
See 105733
Description
Class
TYPO3\CMS\Core\Resource\Security\FileNameValidator
does nothandle a custom file deny pattern in
__construct()
anymore. Theservice is now stateless and can be injected without side effects.
Impact
A custom partial regex as first constructor argument when instantiating
the service is ignored. The service relies on
$GLOBALS['TYPO3_CONF_VARS']['BE']['fileDenyPattern']
configuration,and a hard coded constant as fallback.
Affected installations
Instances with custom extensions using
GeneralUtility::makeInstance(FileNameValidator::class, 'some-custom-pattern');
are affected. This is most likely a very rare case.
Migration
Extensions that need to test with custom patterns that can not be
declared globally using
$GLOBALS['TYPO3_CONF_VARS']['BE']['fileDenyPattern']
should probablyswitch to an own service implementing the test, or inline the code. The
main worker code of the service is just four lines of code.
PHP-API, NotScanned, ext:core
The text was updated successfully, but these errors were encountered: