add warning to CDNRoot

This commit is contained in:
zkldi
2021-06-25 23:26:02 +01:00
parent 958a67a8e5
commit ca35f0944f
+3
View File
@@ -13,6 +13,9 @@ const logger = CreateLogCtx(__filename);
/**
* Joins a file location against the location of the CDN static store.
*
* @danger - This function should **NEVER** be called with unsanitised user input!
* Path directory traversal *is* possible, and *will* ruin your day.
*/
function CDNRoot(fileLoc: string) {
return path.join(KTCDN_ROOT, fileLoc);