mirror of
https://github.com/AlistGo/alist.git
synced 2025-04-21 20:18:47 +08:00
fix: slice bounds out of range on CanAccess
check
This commit is contained in:
parent
dc000f640a
commit
12a095a1d6
@ -29,7 +29,7 @@ func CanAccess(user *model.User, meta *model.Meta, reqPath string, password stri
|
||||
IsApply(meta.Path, path.Dir(reqPath), meta.HSub) { // the meta should apply to the parent of current path
|
||||
for _, hide := range strings.Split(meta.Hide, "\n") {
|
||||
re := regexp.MustCompile(hide)
|
||||
if re.MatchString(reqPath[len(meta.Path)+1:]) {
|
||||
if re.MatchString(path.Base(reqPath)) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user