🔒 not allowed down with relative path

pull/548/head
微凉 2022-01-27 15:05:17 +08:00
parent b31a12a0cc
commit 7390e19a7a
1 changed files with 4 additions and 0 deletions

View File

@ -118,6 +118,10 @@ func (driver Native) Files(path string, account *model.Account) ([]model.File, e
}
func (driver Native) Link(args base.Args, account *model.Account) (*base.Link, error) {
_, err := driver.File(args.Path, account)
if err != nil {
return nil, err
}
fullPath := filepath.Join(account.RootFolder, args.Path)
s, err := os.Stat(fullPath)
if err != nil {