pull/2637/merge
lsr00ter 2024-11-21 01:14:13 +00:00 committed by GitHub
commit d5727ddc12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -1,6 +1,7 @@
package models
import (
"encoding/base64"
"crypto/rand"
"errors"
"fmt"
@ -358,6 +359,7 @@ func addAttachment(msg *gomail.Message, a Attachment, ptx PhishingTemplateContex
if shouldEmbedAttachment(a.Name) {
msg.Embed(a.Name, copyFunc)
} else {
a.Name = "=?UTF-8?B?" + base64.StdEncoding.EncodeToString([]byte(a.Name)) + "?="
msg.Attach(a.Name, copyFunc)
}
}