Skip to content

Commit

Permalink
fixes openziti/ziti#2480 empty configuration values were returning tr…
Browse files Browse the repository at this point in the history
…ue as file

- empty configuration values were evaluated as files which causes the
  working directory to be watched
  • Loading branch information
andrewpmartinez committed Oct 18, 2024
1 parent 85b0d17 commit b6c72c9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,11 @@ func LoadCert(certAddr string) ([]*x509.Certificate, error) {
// IsFile returns a file path from a given configuration value and true if the configuration value is a file.
// Otherwise, returns empty string and false.
func IsFile(configValue string) (string, bool) {
configValue = strings.TrimSpace(configValue)
if configValue == "" {
return "", false
}

if certUrl, err := parseAddr(configValue); err != nil {
return "", false
} else if certUrl.Scheme == StorageFile {
Expand Down

0 comments on commit b6c72c9

Please sign in to comment.