Project

General

Profile

Actions

Feature #87737

open

check if extensionName is valid

Added by Kay Strobach almost 6 years ago. Updated almost 3 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Extension Manager
Target version:
-
Start date:
2019-02-19
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Right noch ExtensionUtility::checkExtensionNameFormat fails to check the validity of the extension name, as just the empty case is

typo3/sysext/extbase/Classes/Utility/ExtensionUtility.php:243

    /**
     * Check a given extension name for validity.
     *
     * @param string $extensionName The name of the extension
     * @throws \InvalidArgumentException
     */
    protected static function checkExtensionNameFormat($extensionName)
    {
        if (empty($extensionName)) {
            throw new \InvalidArgumentException('The extension name must not be empty', 1239891990);
        }
    }

According to TER docs there are many more rules:

  • Allowed characters are: a-z (lowercase), 0-9 and '_' (underscore)
  • The key must not begin with one of the following prefixes: tx,user_,pages,tt_,sys_,ts_language_,csh_
  • Extension keys must not start with a number and must not start or end with an '_' (underscore)
  • An extension key must have minimum 3, maximum 30 characters (not counting underscores)
Actions

Also available in: Atom PDF