From d7c305b26c3dbbcaf4293c698950691007b83356 Mon Sep 17 00:00:00 2001 From: wkc <978997012@qq.com> Date: Mon, 30 Mar 2026 10:49:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=AF=86=E7=A0=81=E5=8A=A0?= =?UTF-8?q?=E5=AF=86=E4=BC=A0=E8=BE=93=E5=89=8D=E7=AB=AF=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...6-03-30-login-password-encryption-frontend.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 doc/implementation-report-2026-03-30-login-password-encryption-frontend.md diff --git a/doc/implementation-report-2026-03-30-login-password-encryption-frontend.md b/doc/implementation-report-2026-03-30-login-password-encryption-frontend.md new file mode 100644 index 0000000..0a09ac6 --- /dev/null +++ b/doc/implementation-report-2026-03-30-login-password-encryption-frontend.md @@ -0,0 +1,16 @@ +# 密码加密传输前端实施记录 + +## 修改内容 +- 新增 `ruoyi-ui/src/utils/passwordTransfer.js`,统一处理密码字段 AES/ECB/PKCS7 加密。 +- 在 `ruoyi-ui/package.json` 增加 `test:password-transfer` 脚本,并引入 `crypto-js` 依赖。 +- 在 `ruoyi-ui/src/api/login.js` 中为登录、注册请求只加密 `password` 字段。 +- 在 `ruoyi-ui/src/api/system/user.js` 中为个人修改密码、管理员新增用户、管理员重置密码请求加密受控密码字段。 +- 在 `ruoyi-ui/.env.development`、`ruoyi-ui/.env.staging`、`ruoyi-ui/.env.production` 增加 `VUE_APP_PASSWORD_TRANSFER_KEY` 配置。 +- 页面组件保持明文表单值和原有校验逻辑不变。 + +## 新增验证 +- 新增 `ruoyi-ui/tests/password-transfer-api.test.js`,覆盖密码加密工具、登录、注册、个人修改密码、管理员新增用户、管理员重置密码 API。 + +## 验证结果 +- 执行 `npm run test:password-transfer`,结果通过。 +- 执行 `npm run build:stage`,结果通过;仅存在既有的打包体积 warning,无新增构建错误。