Skip to contentSkip to conversation

Added space to allowedNameFormat

PATCH New [email protected] 1 participant 1 message May 13

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Added space to allowedNameFormat

From: Konstantine <[email protected]>

Commit message:

fix(windows): support adapter names containing spaces

WireGuardNT permits NIC names with spaces (e.g., WireGuardCreateAdapter(L"Data Center", ...)), but the Windows implementation previously rejected them.
This update removes that limitation and enables full compatibility.

---
 conf/name.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
conf/name.go +1 -1
index c34db900..3f5c680e 100644
@@ -24,7 +24,7 @@ const (
 	specialChars         = "/\\<>:\"|?*\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x00"
 )
 
-var allowedNameFormat = regexp.MustCompile("^[a-zA-Z0-9_=+.-]{1,32}$")
+var allowedNameFormat = regexp.MustCompile("^[a-zA-Z0-9_=+. -]{1,32}$")
 
 func isReserved(name string) bool {
 	if len(name) == 0 {
Signature · 1 line
2.50.1.windows.1