Validate complete engine addresses and retain shared socket inputs (#503)
This commit is contained in:
parent
97ce77d3de
commit
4a87fc2c7d
+2
-1
@@ -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"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user