diff --git a/cmd/notary/keys.go b/cmd/notary/keys.go index a562f984e3..95047a6fa4 100644 --- a/cmd/notary/keys.go +++ b/cmd/notary/keys.go @@ -162,8 +162,11 @@ func keysGenerate(cmd *cobra.Command, args []string) { fatalf("must specify a GUN") } - // (diogo): Validate GUNs + //TODO (diogo): Validate GUNs. Don't allow '/' or '\' for now. gun := args[0] + if gun[0:1] == "/" || gun[0:1] == "\\" { + fatalf("invalid Global Unique Name: %s", gun) + } _, cert, err := generateKeyAndCert(gun) if err != nil { diff --git a/cmd/notary/main.go b/cmd/notary/main.go index 69afe31d05..8b8f9ebed7 100644 --- a/cmd/notary/main.go +++ b/cmd/notary/main.go @@ -26,7 +26,7 @@ const tufDir string = configPath + "tuf/" var caStore trustmanager.X509Store func init() { - logrus.SetLevel(logrus.DebugLevel) + logrus.SetLevel(logrus.ErrorLevel) // Retrieve current user to get home directory usr, err := user.Current() if err != nil {