1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-08-15 20:13:16 +02:00

Ignore gosec warning about file permission being set via tar header

This commit is contained in:
Ralph Slooten
2024-10-24 16:52:09 +13:00
parent 2420aa7c2a
commit e2c3256f0c

View File

@@ -202,7 +202,7 @@ func extract(filePath string, directory string) error {
}
// set file permissions, timestamps & uid/gid
_ = os.Chmod(filename, os.FileMode(header.Mode))
_ = os.Chmod(filename, os.FileMode(header.Mode)) // #nosec
_ = os.Chtimes(filename, header.AccessTime, header.ModTime)
_ = os.Chown(filename, header.Uid, header.Gid)
}