安全加固:CORS白名单、JWT密钥自动生成、SSRF防护、路径遍历与错误信息泄露修复
Build Backend JAR / build (push) Has been cancelled

This commit is contained in:
2026-08-25 18:05:28 +08:00
parent c8fb93ff29
commit 338493ecaa
12 changed files with 168 additions and 31 deletions
+3 -2
View File
@@ -2,7 +2,7 @@
版本公开 API 蓝图:当前版本、最新版本下载链接
"""
import os
from flask import Blueprint, jsonify
from flask import Blueprint, jsonify, current_app
from utils.db import get_db
@@ -37,4 +37,5 @@ def api_version_latest():
'file_url': row['file_url'] or '',
})
except Exception as e:
return jsonify({'error': str(e)}), 500
current_app.logger.error('[version] internal error: %s', e, exc_info=True)
return jsonify({'error': '服务器内部错误,请稍后重试'}), 500