mirror of https://github.com/gophish/gophish
Updated regex pattern to allow longer TLDs
parent
2d08befb6b
commit
d2efb18ef1
|
@ -104,7 +104,7 @@ func (s *SMTP) Validate() error {
|
||||||
|
|
||||||
// validateFromAddress validates
|
// validateFromAddress validates
|
||||||
func validateFromAddress(email string) bool {
|
func validateFromAddress(email string) bool {
|
||||||
r, _ := regexp.Compile("^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$")
|
r, _ := regexp.Compile("^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,18})$")
|
||||||
return r.MatchString(email)
|
return r.MatchString(email)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue