{"record":{"id":"2f5bd31e8aa436f8","repo":"remotion-dev/remotion","slug":"the-sitename-must-not-be-or-you-passed-2f5bd3","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/lambda/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/lambda/src/shared/validate-site-name.ts#L1-L32","documentation":"Thrown by validateSiteName() in @remotion/lambda when siteName is exactly '.' or '..'. These are reserved filesystem/path segments and would collide with S3 key / bucket-prefix semantics, so they are explicitly rejected after the type check passes.","triggerScenarios":"Passing siteName: '.' or siteName: '..' to any @remotion/lambda API that accepts a site name (deploySite, bucket creation, etc.).","commonSituations":"A default/fallback expression that resolves to '.' (current dir placeholder) when a config field is empty; user input taken from a path component that turns out to be '.' or '..'.","solutions":["Choose a descriptive siteName using safe characters (alphanumerics, '-', '_', '.', '*', \"'\", '(', ')', '!').","If '.' was meant as 'default', pass undefined instead.","Sanitize path-derived input before reusing it as a siteName."],"exampleFix":"// before\nconst siteName = pathInput || '.';\nawait deploySite({ siteName });\n\n// after\nconst siteName = pathInput && pathInput !== '.' && pathInput !== '..' ? pathInput : undefined;\nawait deploySite({ siteName });","handlingStrategy":"validation","validationCode":"const RESERVED = new Set(['.', '..']);\nconst siteName = raw && !RESERVED.has(raw) ? raw : undefined;","typeGuard":"const isSafeSiteName = (v: unknown): v is string =>\n  typeof v === 'string' && v !== '.' && v !== '..' && /^[-0-9a-zA-Z!_.*'()]+$/.test(v);","tryCatchPattern":null,"preventionTips":["Never let a path component ('.' / '..') flow into a siteName.","Use undefined to mean 'default site'.","Slugify any user-supplied name before passing it as siteName."],"tags":["lambda","validation","site-name","s3","configuration"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}