Skip to content

Commit

Permalink
fix(cloudflare): prevent empty key value if email is set
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Apr 29, 2024
1 parent b72711b commit 7d627c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/provider/providers/cloudflare/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ var (

func (p *Provider) isValid() error {
switch {
case p.key != "": // email and key must be provided
case p.email != "", p.key != "": // email and key must be provided
switch {
case !keyRegex.MatchString(p.key):
return fmt.Errorf("%w: key %q does not match regex %q",
Expand Down

0 comments on commit 7d627c8

Please sign in to comment.