Budget OpenSSH temporary sockets in the shared address policy (#503)
This commit is contained in:
parent
df9f50ea31
commit
3bb4324aa0
+2
-1
@@ -64,7 +64,8 @@ export function socketDirectory(identity, options) {
|
|||||||
const { uid, root } = settings(options);
|
const { uid, root } = settings(options);
|
||||||
const input = canonical(["quixos-unix-socket-v1", uid, identity]);
|
const input = canonical(["quixos-unix-socket-v1", uid, identity]);
|
||||||
if (Buffer.byteLength(input) > 1024 * 1024) throw Error("Socket identity exceeds its bound");
|
if (Buffer.byteLength(input) > 1024 * 1024) throw Error("Socket identity exceeds its bound");
|
||||||
return path.join(root, createHash("sha256").update(input).digest("hex"));
|
// Preserve all 256 bits while leaving room for protocol-added socket suffixes.
|
||||||
|
return path.join(root, createHash("sha256").update(input).digest("base64url"));
|
||||||
}
|
}
|
||||||
|
|
||||||
export function socketAddress(identity, role, options) {
|
export function socketAddress(identity, role, options) {
|
||||||
|
|||||||
Reference in New Issue
Block a user