{"record":{"id":"14977d0f0456629e","repo":"remotion-dev/remotion","slug":"the-sitename-must-not-be-or-you-passed","errorCode":null,"errorMessage":"The `siteName` must not be `.` or `..`. You passed: ${siteName}.","messagePattern":"The `siteName` must not be `\\.` or `\\.\\.`\\. You passed: (.+?)\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cloudrun/src/shared/validate-site-name.ts","lineNumber":17,"sourceCode":"const VALID_SITE_NAME_RE = /^[-0-9a-zA-Z!_.*'()]+$/;\n\nexport const validateSiteName = (siteName: unknown) => {\n\tif (typeof siteName === 'undefined') {\n\t\treturn;\n\t}\n\n\tif (typeof siteName !== 'string') {\n\t\tthrow new TypeError(\n\t\t\t`The 'siteName' argument must be a string if provided, but is ${JSON.stringify(\n\t\t\t\tsiteName,\n\t\t\t)}`,\n\t\t);\n\t}\n\n\tif (siteName === '.' || siteName === '..') {\n\t\tthrow new Error(\n\t\t\t'The `siteName` must not be `.` or `..`. You passed: ' + siteName + '.',\n\t\t);\n\t}\n\n\tif (!VALID_SITE_NAME_RE.test(siteName)) {\n\t\tthrow new Error(\n\t\t\t'The `siteName` must match the RegExp `/' +\n\t\t\t\tVALID_SITE_NAME_RE.source +\n\t\t\t\t'/`. You passed: ' +\n\t\t\t\tsiteName +\n\t\t\t\t'. Check for invalid characters.',\n\t\t);\n\t}\n};\n","sourceCodeStart":1,"sourceCodeEnd":32,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/cloudrun/src/shared/validate-site-name.ts#L1-L32","documentation":"Thrown by validateSiteName() when siteName is exactly '.' or '..'. These are reserved path components that cannot be used as a GCS site name because they collide with directory traversal semantics, so the validator rejects them explicitly after the type check.","triggerScenarios":"Passing the literal strings '.' or '..' as siteName, usually from miscomputed defaulting logic or string trimming that reduced the input to one of these.","commonSituations":"A defaulting expression that falls back to '.' when the real name is empty; path-join logic that yields '..'; accidental trimming/normalization of the site name.","solutions":["Use a concrete site name string (letters, digits, and the allowed punctuation) instead of '.' or '..'.","Fix the defaulting logic so an empty input produces a real default name, not '.'.","Validate upstream that the name is neither '.' nor '..'."],"exampleFix":"// before\nconst siteName = name || '.';\n\n// after\nconst siteName = name || 'remotion-default-site';","handlingStrategy":"validation","validationCode":"if (siteName === '.' || siteName === '..') {\n  throw new Error('siteName must not be a reserved path component');\n}","typeGuard":"const isValidSiteNameShape = (v: unknown): v is string =>\n  typeof v === 'string' && v !== '.' && v !== '..';","tryCatchPattern":null,"preventionTips":["Never default an empty site name to '.'; use a concrete default name.","Avoid path-join logic that can yield '..'.","Generate site names from a slugger that cannot produce reserved components."],"tags":["cloudrun","validation","gcs"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}