Skip to content

Commit

Permalink
Set the security level of Windows named pipes to NoSecurity (#6956)
Browse files Browse the repository at this point in the history
  • Loading branch information
irsl authored Feb 14, 2024
1 parent 05db80f commit f94be9b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions credentials/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ func getSecurityLevel(network, addr string) (credentials.SecurityLevel, error) {
// Local TCP connection
case strings.HasPrefix(addr, "127."), strings.HasPrefix(addr, "[::1]:"):
return credentials.NoSecurity, nil
// Windows named pipe connection
case network == "pipe" && strings.HasPrefix(addr, `\\.\pipe\`):
return credentials.NoSecurity, nil
// UDS connection
case network == "unix":
return credentials.PrivacyAndIntegrity, nil
Expand Down

0 comments on commit f94be9b

Please sign in to comment.