Skip to content

Commit 23f1383

Browse files
authored
Set the security level of Windows named pipes to NoSecurity
Communication over named pipes on Windows is local IPC.
1 parent a3f5ed6 commit 23f1383

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

credentials/local/local.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ func getSecurityLevel(network, addr string) (credentials.SecurityLevel, error) {
6565
// Local TCP connection
6666
case strings.HasPrefix(addr, "127."), strings.HasPrefix(addr, "[::1]:"):
6767
return credentials.NoSecurity, nil
68+
// Windows named pipe connection
69+
case network == "pipe" && strings.HasPrefix(addr, `\\.\pipe\`):
70+
return credentials.NoSecurity, nil
6871
// UDS connection
6972
case network == "unix":
7073
return credentials.PrivacyAndIntegrity, nil

0 commit comments

Comments
 (0)