加密分享链接
- Lenguaje dominante
- Go
- Estrellas
- 50.2k
- Forks
- 7.9k
- Merge medio
- 7 d 21 h
- PR fusionados (30 d)
- 6
Descripción
### Please make sure of the following things
- [X] I have read the [documentation](https://alist.nn.ci).
- [X] I'm sure there are no duplicate issues or discussions.
- [X] I'm sure this feature is not implemented.
- [X] I'm sure it's a reasonable and popular requirement.
### Description of the feature / 需求描述
我们在对外分享文件时,生成的外链包含了该文件在本地的所有信息,导致他人能够通过链接访问我的其他不愿意分享的文件,这很暴露隐私,虽然可以通过父目录权限限制其他人访问,但是依旧麻烦。我们需要一个保护外链的功能,让生成的分享链接不包含任何父目录信息。让他外表上看起来就是一串乱码。
### Suggested solution / 实现思路
前端:
①我们可以在生成链接的按钮旁边加上一个输入框,用于用户输入密钥key。
②分享页面不再显示父目录信息
后端:
①在用户选择生成链接时,查看用户是否输入密钥,如果输入,则将key用于加密包含父目录信息的链接,生成加密链接并返回给用户
②当用户将该链接分享给其他人时,也是这个加密链接,服务器只需要读取解密这个加密链接,将对应的文件信息返回即可,且不需要返回父目录信息
### Additional context / 附件
无
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.