{"record":{"id":"69746612de4e9071","repo":"RocketChat/Rocket.Chat","slug":"command-does-not-exist-in-the-system-currently-or","errorCode":null,"errorMessage":"Command does not exist in the system currently (or it is disabled): \"${cmd}\"","messagePattern":"Command does not exist in the system currently \\(or it is disabled\\): \"(.+?)\"","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"apps/meteor/app/apps/server/bridges/commands.ts","lineNumber":82,"sourceCode":"\t\tif (typeof commandObj === 'undefined') {\n\t\t\tthrow new Error(`Command does not exist in the system currently: \"${cmd}\"`);\n\t\t}\n\n\t\tthis.disabledCommands.set(cmd, commandObj);\n\t\tdelete slashCommands.commands[cmd];\n\n\t\tvoid this.orch.getNotifier().commandDisabled(cmd);\n\t}\n\n\t// command: { command, paramsExample, i18nDescription, executor: function }\n\tprotected async modifyCommand(command: ISlashCommand, appId: string): Promise<void> {\n\t\tthis.orch.debugLog(`The App ${appId} is attempting to modify the command: \"${command}\"`);\n\n\t\tthis._verifyCommand(command);\n\n\t\tconst cmd = command.command.toLowerCase();\n\t\tif (typeof slashCommands.commands[cmd] === 'undefined') {\n\t\t\tthrow new Error(`Command does not exist in the system currently (or it is disabled): \"${cmd}\"`);\n\t\t}\n\n\t\tconst item = slashCommands.commands[cmd];\n\n\t\titem.params = command.i18nParamsExample ? command.i18nParamsExample : item.params;\n\t\titem.description = command.i18nDescription ? command.i18nDescription : item.params;\n\t\titem.callback = this._appCommandExecutor.bind(this);\n\t\titem.providesPreview = command.providesPreview;\n\t\titem.previewer = command.previewer ? this._appCommandPreviewer.bind(this) : item.previewer;\n\t\titem.previewCallback = (\n\t\t\tcommand.executePreviewItem ? this._appCommandPreviewExecutor.bind(this) : item.previewCallback\n\t\t) as (typeof slashCommands.commands)[string]['previewCallback'];\n\n\t\tslashCommands.commands[cmd] = item;\n\t\tvoid this.orch.getNotifier().commandUpdated(cmd);\n\t}\n\n\tprotected async registerCommand(command: ISlashCommand, appId: string): Promise<void> {","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/app/apps/server/bridges/commands.ts#L64-L100","documentation":"The /assets/ listener serves admin-managed branding assets. If the requested asset exists and declares constraints.extensions, asking for it in a format not on that list returns a bodyless 403. For example, requesting /assets/logo.jpg when the logo asset only permits svg/png is rejected before any file lookup.","triggerScenarios":"GET /assets/<key>.<ext> where <ext> is not in the asset's constraints.extensions array (e.g. .jpg, .ico, .gif for a logo that only allows svg/png); templates or CDNs deriving the extension from an unrelated source.","commonSituations":"Themes/templates hardcoding formats like .jpg or .ico for assets that only accept svg/png; apps registering assets with narrow constraints; clients guessing formats from user uploads.","solutions":["Request the asset with an allowed extension (usually .svg or .png) or no extension at all","Update templates and stored links to the extension the asset was uploaded with","If a new format is genuinely needed, re-register/re-upload the asset with expanded constraints.extensions"],"exampleFix":"<!-- before -->\n<img src=\"/assets/logo.jpg\" />\n<!-- after -->\n<img src=\"/assets/logo.svg\" />","handlingStrategy":"validation","validationCode":"const ALLOWED = ['svg', 'png'];\nconst assetUrl = (key: string, ext: string) => (ALLOWED.includes(ext) ? `/assets/${key}.${ext}` : `/assets/${key}.svg`);","typeGuard":"const isAllowedExtension = (ext: string, allowed: string[]): boolean => allowed.includes(ext);","tryCatchPattern":null,"preventionTips":["Derive asset URLs from the asset's declared extensions, not from uploaded user files","Keep a single constant for allowed branding asset formats across templates","Test asset URLs after changing asset constraints"],"tags":["assets","http-403","branding","media"],"backgroundTag":"http-403-forbidden","analyzedSha":"b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0","analyzedAt":"2026-08-18T15:26:39.429Z","contentChangedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}