mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-11 18:11:21 +08:00
fix: potential file inclusion via variable
This commit is contained in:
@@ -95,7 +95,7 @@ func (s *Summary) GenHTMLReport() error {
|
||||
}
|
||||
|
||||
reportPath := filepath.Join(reportsDir, "report.html")
|
||||
file, err := os.OpenFile(reportPath, os.O_WRONLY|os.O_CREATE, 0o666)
|
||||
file, err := os.OpenFile(reportPath, os.O_WRONLY|os.O_CREATE, 0o600)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg("open file failed")
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user