fix: 按评审报告止血支付漏洞并加固授权链路

废除浏览器回跳自助结算,通用 webhook 强制密钥鉴权,Waffo 支持验签与未知事件忽略;重构订单状态机/激活占座/SQLite WAL,并补备份、readyz、限流与前端导出/登录页安全修复。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Logan.LiandCursor committed 2026-08-12 21:26:58 +08:00
1 parent 8cc2c83f9d
commit bac72e6945
24 files changed
+682 -391

No files matched your search

+1 -1
View File
@@ -18,7 +18,7 @@ type Order struct {
Status string `json:"status" gorm:"size:20;default:'pending'"` // pending / paid / failed / refunded / cancelled
PaymentMethod string `json:"payment_method" gorm:"size:50"` // paddle / stripe / creem / waffo / alipay / wechat
PaymentGateway string `json:"payment_gateway" gorm:"size:50"`
GatewayOrderNo string `json:"gateway_order_no" gorm:"size:200"`
GatewayOrderNo string `json:"gateway_order_no" gorm:"size:200;index"`
PaidAt *time.Time `json:"paid_at,omitempty"`
RefundAt *time.Time `json:"refund_at,omitempty"`
ClientIP string `json:"client_ip" gorm:"size:50"`