From e11fea2274bf5e404700cd8764ef7ec5e72e756c Mon Sep 17 00:00:00 2001 From: Magnus Larsen Date: Wed, 10 Sep 2025 15:43:15 +0200 Subject: [PATCH] expand regex in ensure_valid_nic This is done so all valid network interfaces in linux are allowed --- lib/linux.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linux.js b/lib/linux.js index 08de844..2973678 100644 --- a/lib/linux.js +++ b/lib/linux.js @@ -14,7 +14,7 @@ function trim_exec(cmd, cb) { } function ensure_valid_nic(str) { - if (str.match(/[^\w]/)) + if (str.match(/^[\w.-:]{1,15}$/)) throw new Error("Invalid nic name given: " + str); }