AlistGo / AlistGo/alist

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

Abierto
#7,785 0 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement
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 / 需求描述

当前代码在 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_

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.