Skip to content

Commit

Permalink
fix: another wrong fix of handling non-key files
Browse files Browse the repository at this point in the history
  • Loading branch information
sietseringers committed May 10, 2019
1 parent c748f4b commit 7f7e0c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/servercore/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7f7e0c8

Please sign in to comment.