mirror of https://github.com/gophish/gophish
Merge 06f9270446
into 9561846979
commit
d5727ddc12
|
@ -1,6 +1,7 @@
|
||||||
package models
|
package models
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/base64"
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
@ -358,6 +359,7 @@ func addAttachment(msg *gomail.Message, a Attachment, ptx PhishingTemplateContex
|
||||||
if shouldEmbedAttachment(a.Name) {
|
if shouldEmbedAttachment(a.Name) {
|
||||||
msg.Embed(a.Name, copyFunc)
|
msg.Embed(a.Name, copyFunc)
|
||||||
} else {
|
} else {
|
||||||
|
a.Name = "=?UTF-8?B?" + base64.StdEncoding.EncodeToString([]byte(a.Name)) + "?="
|
||||||
msg.Attach(a.Name, copyFunc)
|
msg.Attach(a.Name, copyFunc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue