 19174616018andClaude
|
9d510afa60
|
安全: 修复密码修改无需验证旧密码的安全漏洞
问题描述:
- 用户修改密码时不需要验证当前密码
- 攻击者获取session后可直接修改密码
- 违反基本的安全最佳实践
修复内容:
1. 添加current_password必填验证
2. 在更新密码前验证当前密码正确性
3. 验证失败返回401错误
4. 更新API文档注释
API变更:
POST /api/user/change-password
请求参数:
- current_password (新增,必填)
- new_password (已有,必填)
影响范围: 用户密码修改功能
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
2025-11-11 13:23:18 +08:00 |
|
 19174616018andClaude
|
a953bda39a
|
安全: 修复JWT密钥使用默认值的安全隐患
问题描述:
- JWT_SECRET使用硬编码默认值,存在严重安全风险
- 生产环境token可被轻易伪造
修复内容:
1. 在auth.js中添加JWT密钥安全检查
- 检测默认密钥并发出警告
- 生产环境强制要求设置JWT_SECRET
2. 更新.env.example添加JWT_SECRET配置说明
- 提供密钥生成方法
- 添加其他安全配置项
3. 优化deploy.sh部署脚本
- 自动生成随机JWT密钥
- 检测并替换默认密钥
影响范围: 安全认证模块
测试建议:
- 启动服务验证JWT_SECRET警告正常显示
- 使用deploy.sh部署验证自动生成密钥
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
2025-11-11 13:17:57 +08:00 |
|
 19174616018andClaude
|
d3b9800e35
|
修复: 分享链接无法访问的问题
- 修复nginx配置中X-Forwarded-Proto使用错误的问题
- 将 $http_x_forwarded_proto 改为 $scheme
- 适配IP直接访问的场景
- 添加client_max_body_size 10G 支持大文件上传
- 增加API代理超时时间配置
- 添加favicon.ico避免404错误
修复后分享链接可以正常访问
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
2025-11-11 13:08:52 +08:00 |
|