Validate the languageVariable in I18nHandler::save()
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 11 Aug 2021 12:19:53 +0000 (14:19 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 11 Aug 2021 12:19:53 +0000 (14:19 +0200)
wcfsetup/install/files/lib/system/language/I18nHandler.class.php

index d93a24a7236c9710a85f8aa28df63094440b4b51..c8e3eb48033cbe79c5b06c4fb800b125d0dfc0b3 100644 (file)
@@ -3,6 +3,7 @@
 namespace wcf\system\language;
 
 use wcf\data\language\Language;
+use wcf\data\language\LanguageEditor;
 use wcf\system\database\util\PreparedStatementConditionBuilder;
 use wcf\system\exception\SystemException;
 use wcf\system\Regex;
@@ -305,6 +306,8 @@ class I18nHandler extends SingletonFactory
      */
     public function save($elementID, $languageVariable, $languageCategory, $packageID = PACKAGE_ID)
     {
+        LanguageEditor::validateItemName($languageVariable, $languageCategory);
+
         // get language category id
         $sql = "SELECT  languageCategoryID
                 FROM    wcf" . WCF_N . "_language_category