1
0
mirror of https://github.com/fumiama/paper-manager.git synced 2026-06-21 02:40:26 +08:00

implement file.AddFile

This commit is contained in:
源文雨
2023-03-22 23:31:34 +08:00
parent 929c5ecfbb
commit 05e59426cd
6 changed files with 161 additions and 3 deletions

View File

@@ -179,7 +179,7 @@ func setUserInfo(id int, nick, desc, avtr *string) error {
}
if a == "" {
*avtr = user.Avtr
} else if utils.IsNotExist(global.DataFolder + a) {
} else if strings.Contains(a, "..") || utils.IsNotExist(global.DataFolder+a) {
return os.ErrNotExist
}
if a == user.Avtr {