安全审计与加固:爱发电回调防投毒、回调日志封顶、令牌定长比较、转义补全;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
+3 -2
View File
@@ -165,8 +165,9 @@
/* 自助渲染:渲染机在不在线、每张多少钱(读下单那边的接口 / 内容文件,拿不到就不写) */ /* 自助渲染:渲染机在不在线、每张多少钱(读下单那边的接口 / 内容文件,拿不到就不写) */
(function desk() { (function desk() {
var s = $('#deskStatus'), p = $('#deskPrice'); var s = $('#deskStatus'), p = $('#deskPrice');
fetch('/order/content/order.json', { cache: 'no-cache' }).then(function (r) { return r.ok ? r.json() : null; }).then(function (o) { /* 价格读下单页公开的价格接口(内容后台的原始 order.json 不对外,2026-10-06 安全加固) */
var per = o && o.prices && o.prices.per; fetch('/order/api/payinfo', { cache: 'no-store' }).then(function (r) { return r.ok ? r.json() : null; }).then(function (o) {
var per = o && o.per;
if (p && per) p.textContent = '每张 ' + per + ' 元起,一般 40 秒左右出图'; if (p && per) p.textContent = '每张 ' + per + ' 元起,一般 40 秒左右出图';
}).catch(function () {}); }).catch(function () {});
fetch('/order/api/status', { cache: 'no-store' }).then(function (r) { return r.ok ? r.json() : null; }).then(function (j) { fetch('/order/api/status', { cache: 'no-store' }).then(function (r) { return r.ok ? r.json() : null; }).then(function (j) {