Commit 7f7e0c83 authored by Sietse Ringers's avatar Sietse Ringers
Browse files

fix: another wrong fix of handling non-key files

parent c748f4ba
Pipeline #22974 passed with stages
in 5 minutes and 32 seconds
......@@ -111,8 +111,8 @@ func (s *Server) verifyConfiguration(configuration *server.Configuration) error
}
for _, file := range files {
filename := file.Name()
if filepath.Ext(filename) != ".xml" || strings.Count(filename, ".") != 3 {
s.conf.Logger.Infof("Skipping non-private key file %s encountered in private keys path", filename)
if filepath.Ext(filename) != ".xml" || filename[0] == '.' || strings.Count(filename, ".") != 2 {
s.conf.Logger.WithField("file", filename).Infof("Skipping non-private key file encountered in private keys path")
continue
}
issid := irma.NewIssuerIdentifier(strings.TrimSuffix(filename, filepath.Ext(filename))) // strip .xml
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment