安全审计与加固:爱发电回调防投毒、回调日志封顶、令牌定长比较、转义补全;nginx 安全头 / 挡备份与原始内容文件(片段 + 文档)

Browse Source
- 没验证过的爱发电回调不再写进账本 pay_orders,只进 50 条封顶的待核对清单;回调日志只记关键头 + 正文 4KB、5MB 轮转(测试 +2)
- 福利券领取令牌定长比较;ys_admin.py 转义补上引号;星门格子提示转义;首页价格改读公开接口
- nginx 片段:安全头(HSTS/nosniff/XFO/Referrer/Permissions/CSP)、挡备份 / 预览稿 / 隐藏文件 / 原始内容 json、回调单独限流、server_tokens off
- 交接文档 2.9 安全加固 + 维护页挂法更新

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
yws
2026-10-06 12:52:16 +00:00
co-authored by Claude Opus 5.5
parent 9f2322e7ae
commit cb7cd3649b
13 changed files with 133 additions and 53 deletions
+2 -1
View File
@@ -16,7 +16,8 @@
var all = uv.lit.concat(uv.empty).sort(function (a, b) { return a.no < b.no ? -1 : 1; }); var all = uv.lit.concat(uv.empty).sort(function (a, b) { return a.no < b.no ? -1 : 1; });
slots.innerHTML = all.map(function (u, i) { slots.innerHTML = all.map(function (u, i) {
var lk = uv.looks[u.no] || {}, c = u.empty ? '' : (lk.accent || u.tone || '#9A6BE0'); var lk = uv.looks[u.no] || {}, c = u.empty ? '' : (lk.accent || u.tone || '#9A6BE0');
return '<i class="' + (u.empty ? 'e' : 'l') + '" style="--i:' + i + (c ? ';--c:' + c : '') + '" title="' + u.no + '"></i>'; var e = window.JZP ? window.JZP.esc : function (x) { return String(x).replace(/[&<>"']/g, ''); };
return '<i class="' + (u.empty ? 'e' : 'l') + '" style="--i:' + i + (c ? ';--c:' + e(c) : '') + '" title="' + e(u.no) + '"></i>';
}).join(''); }).join('');
gate.style.setProperty('--n', all.length); gate.style.setProperty('--n', all.length);
gate.classList.add('scan'); gate.classList.add('scan');