Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AList v3.1.0,元信息设置了文件夹密码,但是实际无效仍可以查看(无论是用户还是游客) #1977

Closed
4 tasks done
ubnm opened this issue Oct 11, 2022 · 13 comments
Labels
bug Something isn't working

Comments

@ubnm
Copy link

ubnm commented Oct 11, 2022

Please make sure of the following things

  • I have read the documentation.
  • I'm sure there are no duplicate issues or discussions.
  • I'm sure it's due to alist and not something else(such as Dependencies or Operational).
  • I'm sure I'm using the latest version

Alist Version / Alist 版本

v3.1.0

Driver used / 使用的存储驱动

Onedrive

Describe the bug / 问题描述

AList v3.1.0,元信息设置了文件夹密码,但是实际无效仍可以查看(无论是用户还是游客)

Reproduction / 复现链接

/

Logs / 日志

[GIN] 2022/10/11 - 22:15:48 | 200 |   876.33567ms |    | GET      "/d/🐢Allen🐢/2a02b3f9e8f7e672c83065959e5dc34a.png?sign=C32cSQJB0ZbF-9wNHvFqnBw4gxjKZxlI75YkQrENlRQ=:0"

排查了日记输出没有问题是正常进入
@ubnm ubnm added the bug Something isn't working label Oct 11, 2022
@welcome
Copy link

welcome bot commented Oct 11, 2022

Thanks for opening your first issue here! Be sure to follow the issue template!

@ubnm
Copy link
Author

ubnm commented Oct 11, 2022

@ubnm
Copy link
Author

ubnm commented Oct 11, 2022

更正:元信息设置的文件夹密码不能作用于游客用户,游客用户可以查看所有,用户登录后反而需要填写密码后才能进入文件夹

@ynyyn
Copy link

ynyyn commented Mar 25, 2023

看起来是因为有程序缓存,导致 alist 新设置元信息密码并不立刻生效。我这边试着重启服务,行为就符合预期了。
我觉得这里或许可以被认为是有缺陷的,应该考虑刷新缓存。

@ynyyn
Copy link

ynyyn commented Mar 25, 2023

我发现触发这一问题的场景似乎是编辑一个已有的元信息。编辑元信息的路径,提交保存后元信息密码彻底失效,除非将「应用到子文件夹」来回切换保存,或者重启程序,密码才会生效。

无论是旧路径还是新路径,无论原本状态是否应用到子文件夹,都需要来回切换一下「应用到子文件夹」开关,密码功能才恢复正常。

@zerofo
Copy link

zerofo commented Aug 15, 2023

我发现触发这一问题的场景似乎是编辑一个已有的元信息。编辑元信息的路径,提交保存后元信息密码彻底失效,除非将「应用到子文件夹」来回切换保存,或者重启程序,密码才会生效。

无论是旧路径还是新路径,无论原本状态是否应用到子文件夹,都需要来回切换一下「应用到子文件夹」开关,密码功能才恢复正常。

然而 知道 路径 加个 /p/ 还可以不用密码。。。
例如 http://ip/test/ 元信息加密 test下有test.zip
直接访问 http://ip/p/test/test.zip 还是能正常下载无需密码

@xhofe
Copy link
Member

xhofe commented Aug 15, 2023

我发现触发这一问题的场景似乎是编辑一个已有的元信息。编辑元信息的路径,提交保存后元信息密码彻底失效,除非将「应用到子文件夹」来回切换保存,或者重启程序,密码才会生效。
无论是旧路径还是新路径,无论原本状态是否应用到子文件夹,都需要来回切换一下「应用到子文件夹」开关,密码功能才恢复正常。

然而 知道 路径 加个 /p/ 还可以不用密码。。。 例如 http://ip/test 元信息加密 test下有test.zip 直接访问 http://ip/p/test/test.zip 还是能正常下载无需密码

https://alist.nn.ci/guide/drivers/common.html#enable-signing

@zerofo
Copy link

zerofo commented Aug 15, 2023

知道 路径 加个 /p/ 还可以不用密码。。。
例如 http://ip/test/ 元信息加密 test下有test.zip
直接访问 http://ip/p/test/test.zip 还是能正常下载无需密码

感谢

@zerofo
Copy link

zerofo commented Aug 16, 2023

我发现触发这一问题的场景似乎是编辑一个已有的元信息。编辑元信息的路径,提交保存后元信息密码彻底失效,除非将「应用到子文件夹」来回切换保存,或者重启程序,密码才会生效。
无论是旧路径还是新路径,无论原本状态是否应用到子文件夹,都需要来回切换一下「应用到子文件夹」开关,密码功能才恢复正常。

然而 知道 路径 加个 /p/ 还可以不用密码。。。 例如 http://ip/test 元信息加密 test下有test.zip 直接访问 http://ip/p/test/test.zip 还是能正常下载无需密码

https://alist.nn.ci/guide/drivers/common.html#enable-signing

大佬, 请问一下,, 这么设置以后, 访客 http://ip/test/test.zip 需要密码.. 但是 密码怎么输入都不对= = 这个怎么解?

似乎也有人遇到 #2567
不过他还能 输入管理员密码进入。。 我啥密码都不行

alist 版本:
Commit ID: 1aa024e
Version: dev
系统: ubuntu

@zerofo
Copy link

zerofo commented Aug 16, 2023

zerofo

在 master 中 重新编译 release 版本也一样。

Built At: 2023-08-16 14:32:12 +0800
Go Version: go1.20.3 linux/amd64
Author: Xhofe <i@nn.ci>
Commit ID: e9bdb91
Version: 
WebVersion: 3.25.1

似乎是这里提示的 密码错误。

common.ErrorStrResp(c, "password is incorrect or you have no permission", 403)

@zerofo
Copy link

zerofo commented Aug 16, 2023

zerofo

在 master 中 重新编译 release 版本也一样。

Built At: 2023-08-16 14:32:12 +0800
Go Version: go1.20.3 linux/amd64
Author: Xhofe <i@nn.ci>
Commit ID: e9bdb91
Version: 
WebVersion: 3.25.1

似乎是这里提示的 密码错误。

common.ErrorStrResp(c, "password is incorrect or you have no permission", 403)

在这里返回了。

return false

@zerofo
Copy link

zerofo commented Aug 16, 2023

zerofo

在 master 中 重新编译 release 版本也一样。

Built At: 2023-08-16 14:32:12 +0800
Go Version: go1.20.3 linux/amd64
Author: Xhofe <i@nn.ci>
Commit ID: e9bdb91
Version: 
WebVersion: 3.25.1

似乎是这里提示的 密码错误。

common.ErrorStrResp(c, "password is incorrect or you have no permission", 403)

在这里返回了。

return false

至少在这里

IsApply(meta.Path, path.Dir(reqPath), meta.HSub) { // the meta should apply to the parent of current path

        IsApply(meta.Path, path.Dir(reqPath), meta.HSub) && !(meta.Password == password)){ // the meta should apply to the parent of current path

要么直接 隐藏了就不显示输入密码界面,
不然密码怎么打都提示不对,不符合逻辑。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants