Merge pull request #1200 from gsd-build/fix/unit-runtime-sanitization
fix: broaden unit-runtime path sanitization
This commit is contained in:
commit
97b7c0b18a
1 changed files with 2 additions and 2 deletions
|
|
@ -51,8 +51,8 @@ function runtimeDir(basePath: string): string {
|
|||
}
|
||||
|
||||
function runtimePath(basePath: string, unitType: string, unitId: string): string {
|
||||
const sanitizedUnitType = unitType.replace(/[\/]/g, "-");
|
||||
const sanitizedUnitId = unitId.replace(/[\/]/g, "-");
|
||||
const sanitizedUnitType = unitType.replace(/[^a-zA-Z0-9._-]+/g, "-");
|
||||
const sanitizedUnitId = unitId.replace(/[^a-zA-Z0-9._-]+/g, "-");
|
||||
return join(runtimeDir(basePath), `${sanitizedUnitType}-${sanitizedUnitId}.json`);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue