mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
fix: potential file inclusion via variable
This commit is contained in:
@@ -119,7 +119,7 @@ func LoadCurlCase(path string) (*hrp.TestCaseDef, error) {
|
||||
}
|
||||
|
||||
func readFileLines(path string) ([]string, error) {
|
||||
file, err := os.OpenFile(path, os.O_RDONLY, 0o666)
|
||||
file, err := os.OpenFile(path, os.O_RDONLY, 0o600)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Str("path", path).Msg("open file failed")
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user