Skip to content

Commit

Permalink
simplify return in helper func
Browse files Browse the repository at this point in the history
  • Loading branch information
fairclothjm committed Mar 13, 2024
1 parent d5fd40d commit af5fe32
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions path_oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -542,11 +542,11 @@ func isLocalAddr(hostname string) bool {
ip := net.ParseIP(hostname)
if ip != nil {
return ip.IsLoopback()
} else {
// localhost is not guaranteed to map back to a loopback interface address
// however, this is historically how the plugin has behaved
return hostname == "localhost"
}

// localhost is not guaranteed to map back to a loopback interface address
// however, this is historically how the plugin has behaved
return hostname == "localhost"
}

// validRedirect checks whether uri is in allowed using special handling for loopback uris.
Expand Down

0 comments on commit af5fe32

Please sign in to comment.