Skip to content

Commit

Permalink
Fix gosec issue
Browse files Browse the repository at this point in the history
  • Loading branch information
koddr committed Aug 31, 2021
1 parent a6d2d02 commit 40e4f57
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"io/ioutil"
"mime/quotedprintable"
"net/smtp"
"path/filepath"
"strings"
"time"
)
Expand Down Expand Up @@ -52,7 +53,7 @@ func (s *Sender) SendPlainEmail(to, cc []string, subject, data string, files []s
}

func (s *Sender) attachFile(file string) string {
rawFile, err := ioutil.ReadFile(file)
rawFile, err := ioutil.ReadFile(filepath.Clean(file))
if err != nil {
return ""
}
Expand Down

0 comments on commit 40e4f57

Please sign in to comment.