File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11## [2.1.20260511041705] - 2026-05-11 04:17:05
22
3+ ### Change
4+
5+ - 优化 **登录设置页面** 密码验证逻辑,避免小白设置 `ADMIN` 密码的时候存在换行符,导致密码怎么都输不对然后心态爆炸!
6+
37### Delete
48
5- - 移除 订阅响应头中的请求数刷新倒计时,避免小白心态爆炸 !
9+ - 移除 订阅响应头中的请求数刷新倒计时,避免小白看到后心态爆炸 !
610
711## [2.1.20260508190728] - 2026-05-08 19:07:28
812
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ export default {
7070 const formData = await request . text ( ) ;
7171 const params = new URLSearchParams ( formData ) ;
7272 const 输入密码 = params . get ( 'password' ) ;
73- if ( 输入密码 === 管理员密码 ) {
73+ if ( 输入密码 === ( typeof 管理员密码 === 'string' ? 管理员密码 . replace ( / [ \r \n ] / g , '' ) : 管理员密码 ) ) {
7474 // 密码正确,设置cookie并返回成功标记
7575 const 响应 = new Response ( JSON . stringify ( { success : true } ) , { status : 200 , headers : { 'Content-Type' : 'application/json;charset=utf-8' } } ) ;
7676 响应 . headers . set ( 'Set-Cookie' , `auth=${ await MD5MD5 ( UA + 加密秘钥 + 管理员密码 ) } ; Path=/; Max-Age=86400; HttpOnly` ) ;
You can’t perform that action at this time.
0 commit comments