Skip to content

Commit

Permalink
security: Clean filepath before open() call
Browse files Browse the repository at this point in the history
Signed-off-by: AlexNg <contact@ngjx.org>
  • Loading branch information
caffeine-addictt committed Aug 30, 2024
1 parent 1e73765 commit a53c12e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/template/parse_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

func ParseConfig(filePath string) (*config.TemplateJson, error) {
file, err := os.Open(filePath)
file, err := os.Open(filepath.Clean(filePath))
if err != nil {
return nil, err
}
Expand Down

0 comments on commit a53c12e

Please sign in to comment.