AlistGo / AlistGo/alist

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

Aberta
#7,785 0 comentários 0 reações 0 responsáveis Ver no GitHub
enhancement
Linguagem predominante
Go
Estrelas
50.2k
Forks
7.9k
Merge médio
7d 21h
PRs com merge (30d)
6

Descrição

### 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_

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.