{"record":{"id":"a99a67542e0dcad2","repo":"octobercms/october","slug":"invalid-file-extension-invalid-allowed-extensio","errorCode":null,"errorMessage":"Invalid file extension: :invalid. Allowed extensions are: :allowed.","messagePattern":"Invalid file extension: :invalid\\. Allowed extensions are: :allowed\\.","errorType":"validation","errorClass":"ValidationException","httpStatus":null,"severity":"error","filePath":"modules/cms/classes/Asset.php","lineNumber":407,"sourceCode":"    protected function validateFileName($fileName = null)\n    {\n        if ($fileName === null) {\n            $fileName = $this->fileName;\n        }\n\n        $fileName = trim($fileName);\n\n        if (!strlen($fileName)) {\n            throw new ValidationException(['fileName' =>\n                Lang::get('cms::lang.cms_object.file_name_required', [\n                    'allowed' => implode(', ', $this->allowedExtensions),\n                    'invalid' => pathinfo($fileName, PATHINFO_EXTENSION)\n                ])\n            ]);\n        }\n\n        if (!FileHelper::validateExtension($fileName, $this->allowedExtensions, false)) {\n            throw new ValidationException(['fileName' =>\n                Lang::get('cms::lang.cms_object.invalid_file_extension', [\n                    'allowed' => implode(', ', $this->allowedExtensions),\n                    'invalid' => pathinfo($fileName, PATHINFO_EXTENSION)\n                ])\n            ]);\n        }\n\n        if (!FileHelper::validatePath($fileName, null)) {\n            throw new ValidationException(['fileName' =>\n                Lang::get('cms::lang.cms_object.invalid_file', [\n                    'name' => $fileName\n                ])\n            ]);\n        }\n    }\n\n    /**\n     * validate object","sourceCodeStart":389,"sourceCodeEnd":425,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/cms/classes/Asset.php#L389-L425","documentation":"Error \"Invalid file extension: :invalid. Allowed extensions are: :allowed.\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/cms/classes/Asset.php:407 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}