mirror of
https://github.com/axllent/mailpit.git
synced 2025-03-17 21:18:19 +02:00
parent
06aa7a2dea
commit
5f9efebeb3
@ -160,11 +160,12 @@ func VerifyConfig() error {
|
||||
SMTPAuth = a
|
||||
}
|
||||
|
||||
if strings.Contains(Webroot, " ") {
|
||||
return fmt.Errorf("Webroot cannot contain spaces (%s)", Webroot)
|
||||
validWebrootRe := regexp.MustCompile(`[^0-9a-zA-Z\/-]`)
|
||||
if validWebrootRe.MatchString(Webroot) {
|
||||
return fmt.Errorf("Invalid characters in Webroot (%s). Valid chars: a-z, A-Z, 0-9, - and /", Webroot)
|
||||
}
|
||||
|
||||
s := path.Join("/", Webroot, "/")
|
||||
s := strings.TrimRight(path.Join("/", Webroot, "/"), "/") + "/"
|
||||
Webroot = s
|
||||
|
||||
SMTPTags = []Tag{}
|
||||
|
Loading…
x
Reference in New Issue
Block a user