Validate complete engine addresses and retain shared socket inputs (#503)

This commit is contained in:
Quixos Development Agent 01f26965-84fa-4a79-8069-725682c13065
2026-10-29 12:30:55 +00:00
parent 97ce77d3de
commit 4a87fc2c7d
4 changed files with 48 additions and 15 deletions
+2 -1
View File
@@ -68,7 +68,8 @@ export function socketDirectory(identity, options) {
}
export function socketAddress(identity, role, options) {
if (typeof role !== "string" || !/^[a-z][a-z0-9-]{0,10}$/.test(role)) throw Error("Invalid bounded socket role");
if (typeof role !== "string" || role !== role.trim() || !/^[a-z][a-z0-9-]{0,10}$/.test(role))
throw Error("Invalid bounded socket role");
return checkedSocketPath(path.join(socketDirectory(identity, options), role + ".sock"));
}