From 58b252a9e9ef86ed7def976fa40257d848a34264 Mon Sep 17 00:00:00 2001 From: Maidul Islam Date: Thu, 8 Dec 2022 09:01:24 -0500 Subject: [PATCH] Loosen email regex --- cli/packages/cmd/login.go | 2 +- cli/packages/cmd/root.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/packages/cmd/login.go b/cli/packages/cmd/login.go index f84fad501..d44882358 100644 --- a/cli/packages/cmd/login.go +++ b/cli/packages/cmd/login.go @@ -114,7 +114,7 @@ func init() { func askForLoginCredentials() (email string, password string, err error) { validateEmail := func(input string) error { - matched, err := regexp.MatchString("^[\\w!#$%&'*+/=?`{|}~^-]+(?:\\.[\\w!#$%&'*+/=?`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$", input) + matched, err := regexp.MatchString("^\\S+@\\S+$", input) if err != nil || !matched { return errors.New("this doesn't look like an email address") } diff --git a/cli/packages/cmd/root.go b/cli/packages/cmd/root.go index 42d85e5b2..12e4351bb 100644 --- a/cli/packages/cmd/root.go +++ b/cli/packages/cmd/root.go @@ -15,7 +15,7 @@ var rootCmd = &cobra.Command{ Short: "Infisical CLI is used to inject environment variables into any process", Long: `Infisical is a simple, end-to-end encrypted service that enables teams to sync and manage their environment variables across their development life cycle.`, CompletionOptions: cobra.CompletionOptions{DisableDefaultCmd: true}, - Version: "0.1.6", + Version: "0.1.8", } // Execute adds all child commands to the root command and sets flags appropriately.