{"record":{"id":"7d0f1ec1423e5e26","repo":"octobercms/october","slug":"invalid-hash","errorCode":null,"errorMessage":"Invalid hash","messagePattern":"Invalid hash","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/backend/controllers/Files.php","lineNumber":190,"sourceCode":"            throw new ApplicationException('File not found');\n        }\n\n        // Ensure that the file model utilized for this request is\n        // the one specified in the relationship configuration\n        if ($file->attachment) {\n            $fileModel = $file->attachment->{$file->field}()->getRelated();\n\n            // Only attempt to get file model through its assigned class\n            // when the assigned class differs from the default one that\n            // the file has already been loaded from\n            if (get_class($file) !== get_class($fileModel)) {\n                $file = $fileModel->find($file->id);\n            }\n        }\n\n        $verifyCode = self::getUniqueCode($file);\n        if ($code != $verifyCode) {\n            throw new ApplicationException('Invalid hash');\n        }\n\n        /**\n         * @event backend.files.get\n         * Fires before a file is output.\n         *\n         * Example usage:\n         *\n         *     Event::listen('backend.files.get', function ((\\System\\Models\\File) $file) {\n         *         // Block access to this file\n         *         return false;\n         *\n         *         // Or signal access denied\n         *         throw new \\ForbiddenException;\n         *     });\n         *\n         */\n        $response = Event::fire('backend.files.get', [$file], true);","sourceCodeStart":172,"sourceCodeEnd":208,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/controllers/Files.php#L172-L208","documentation":"Error \"Invalid hash\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/backend/controllers/Files.php:190 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"}