fix sec
Some checks failed
CloudSave/pipeline/head Something is wrong with the build of this commit

This commit is contained in:
2025-09-07 01:31:14 +02:00
parent af11e843a4
commit 46f312078d
12 changed files with 181 additions and 178 deletions

View File

@@ -2,6 +2,7 @@ package htpasswd
import (
"os"
"path/filepath"
"strings"
)
@@ -12,7 +13,7 @@ type (
)
func Open(path string) (File, error) {
c, err := os.ReadFile(path)
c, err := os.ReadFile(filepath.Clean(path))
if err != nil {
return File{}, err
}
@@ -26,7 +27,7 @@ func Open(path string) (File, error) {
if len(kv) != 2 {
continue
}
f.data[kv[0]] = kv[1]
f.data[kv[0]] = kv[1]
}
return f, nil