Skip to content

Commit

Permalink
clean our passPath for good measure
Browse files Browse the repository at this point in the history
  • Loading branch information
qbit committed Dec 10, 2021
1 parent 14bdf17 commit e3b3dad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func main() {
log.Fatalln(err)
}

f, err := os.OpenFile(passPath, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0600)
f, err := os.OpenFile(filepath.Clean(passPath), os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0600)
if err != nil {
log.Fatalln(err)
}
Expand Down Expand Up @@ -231,7 +231,7 @@ func main() {
os.Exit(1)
}
} else {
p, err := os.Open(passPath)
p, err := os.Open(filepath.Clean(passPath))
if err != nil {
log.Fatal(err)
}
Expand Down

0 comments on commit e3b3dad

Please sign in to comment.