From b6c72c99957606a929202a996b0fa376bda5939e Mon Sep 17 00:00:00 2001 From: Andrew Martinez Date: Fri, 18 Oct 2024 13:42:01 -0400 Subject: [PATCH] fixes openziti/ziti#2480 empty configuration values were returning true as file - empty configuration values were evaluated as files which causes the working directory to be watched --- identity.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/identity.go b/identity.go index d8433a7..5c0562c 100644 --- a/identity.go +++ b/identity.go @@ -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 {