Skip to content

v3.1.1_rc4

Latest

Choose a tag to compare

@keepchen keepchen released this 11 Nov 09:26
· 9 commits to main since this release

[v3.1.1_rc4] – 2026-11-11

Important

本版本需要 Go 1.26.10 或更高版本。

This release requires Go 1.26.10 or later.

✨ 新增 RSA-OAEP 加解密,修复 Argon2id 盐值生成问题,并将 CI 静态检查迁移至 golangci-lint。

中文

🔒 安全修复

  • utils/argon2: 修复 Argon2id 密码哈希使用可预测盐值的问题(CWE-760),改用 crypto/rand 生成盐值。校验哈希时检查编码格式、算法版本和计算成本,拒绝格式无效或超出资源上限的输入,同时兼容符合校验规则的旧哈希,包括使用较短盐值的哈希。(bd7c935)

🚀 新功能

  • utils/rsa: 新增 EncryptOAEP 和 DecryptOAEP,使用 SHA-256,支持自定义 OAEP 标签,密文采用 Base64 编码。(2fad8ad)
  • sail: sail.Password() 新增 RSAEncryptOAEP 和 RSADecryptOAEP,使用空标签。原有 RSA PKCS #1 v1.5 加解密方法已标记为弃用。(2fad8ad)

🐛 修复

  • utils/cert: 修复证书与 EC 私钥匹配时错误的类型断言,避免校验时发生 panic。(c7911d8)
  • utils/rsa: 解析到非 RSA 密钥时返回错误,避免类型断言触发 panic。(2fad8ad)

🧱 构建与工作流

  • workflow: 以 golangci-lint 替换 Go Report Card 工作流及 README 徽章。新工作流从 go.mod 读取 Go 版本,在推送到 main、提交 PR 或手动触发时运行。(c7911d8)

📦 依赖

  • chore(deps): 将 Nacos SDK 从 v2.3.5 升级到 v2.3.6,并整理 go.mod 与 go.sum 中的依赖记录。(52b3bfc)

📖 文档

  • docs: 将英文设为默认 README,简体中文移至 README_ZH.md,并更新多语言 README 中的启动截图、使用案例和赞助信息。将框架及示例中的多处 Go 注释翻译为英文。(4ef2fc0)

English

🔒 Security Fixes

  • utils/argon2: Fixed predictable salts in Argon2id password hashes (CWE-760) by generating salts with crypto/rand. Verification now checks the encoding, algorithm version and computational cost, and rejects malformed inputs or inputs that exceed resource limits. Legacy hashes that pass validation remain supported, including those with shorter salts. (bd7c935)

🚀 Features

  • utils/rsa: Added EncryptOAEP and DecryptOAEP with SHA-256, a caller-supplied OAEP label and Base64-encoded ciphertext. (2fad8ad)
  • sail: Added RSAEncryptOAEP and RSADecryptOAEP to sail.Password(), using an empty label. The existing RSA PKCS #1 v1.5 encryption and decryption methods are now deprecated. (2fad8ad)

🐛 Fixes

  • utils/cert: Fixed an incorrect type assertion that could panic when checking whether a certificate matches an EC private key. (c7911d8)
  • utils/rsa: Return an error when a parsed key is of a different type, preventing a panic during RSA key handling. (2fad8ad)

🧱 Build & Workflow

  • workflow: Replaced the Go Report Card workflow and README badges with golangci-lint. The workflow reads the Go version from go.mod and runs on pushes to main, pull requests and manual dispatch. (c7911d8)

📦 Dependencies

  • chore(deps): Upgraded the Nacos SDK from v2.3.5 to v2.3.6 and tidied dependency entries in go.mod and go.sum. (52b3bfc)

📖 Docs

  • docs: Made English the default README, moved Simplified Chinese to README_ZH.md, and updated the startup screenshot, use cases and sponsor information across the READMEs. Translated Go comments across the framework and examples into English. (4ef2fc0)

Full Changelog: v3.1.1_rc3...v3.1.1_rc4