fix(security): 修复网安扫描相关严重/高危/中危漏洞并加固学生密码重置
关闭工作流 SpEL 命令执行与社团活动 SQL 注入,补齐越权、调试接口、登录喷洒和异常回显等问题;学生密码改为随机临时密码,Web/移动端支持复制。 Constraint: 流程发起/办理接口保持仅登录校验,避免影响请假审批 Rejected: 开启验证码 | Web/移动端登录页均未实现,开启会导致无法登录 Confidence: high Scope-risk: broad Not-tested: 生产环境与社团社长/指导老师视角 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
845c7fd942
commit
da8d332fac
79 files changed
+1156
-547
No files matched your search
@@ -65,6 +65,13 @@ const init = async () => {
|
||||
// 如果域名不相等 则重定向处理
|
||||
const host = window.location.host;
|
||||
if (domain !== host) {
|
||||
// 只允许跳转到本校域名,防止授权码被带到第三方站点
|
||||
const domainHost = String(domain || '').split(':')[0].toLowerCase();
|
||||
const trusted = domainHost === 'hzdyjsxy.cn' || domainHost.endsWith('.hzdyjsxy.cn') || domainHost === 'localhost' || domainHost === '127.0.0.1';
|
||||
if (!trusted) {
|
||||
handleError(new Error('非法的回调域名'));
|
||||
return;
|
||||
}
|
||||
const urlFull = new URL(window.location.href);
|
||||
urlFull.host = domain;
|
||||
window.location.href = urlFull.toString();
|
||||
|
||||
Reference in new issue
Block a user