AlistGo / AlistGo/alist

建议替换 MD5 为更安全的哈希算法

Aperta
#7,785 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Go
Stelle
50.2k
Fork
7.9k
Merge medio
7g 21h
PR unite (30g)
6

Descrizione

### 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 / 需求描述

当前代码在 Digest 认证过程中使用了 MD5 进行哈希计算。MD5 已被认为是不安全的哈希算法,不适合用于安全敏感的场景。

### Suggested solution / 实现思路

为了提高认证过程的安全性,建议将 MD5 替换为更安全的哈希算法,例如 SHA-256 或 SHA-3。

相关文件地址:
https://github.com/AlistGo/alist/blob/687124c81d8256ea202689fbca019d6fcffb10af/pkg/gowebdav/digestAuth.go

建议的解决方案:

将 getMD5 函数及相关代码中的 MD5 替换为 SHA-256 或 SHA-3。

更新 algorithm 字段的处理逻辑,以支持新的哈希算法。

此改动将提升 Digest 认证机制的安全性。

### Additional context / 附件

_No response_

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.