🔒 not allowed down with relative path

This commit is contained in:
微凉 2022-01-27 15:05:17 +08:00
parent b31a12a0cc
commit 7390e19a7a

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 {