refactor: Code security optimization

This commit is contained in:
xuwei-fit2cloud
2025-12-26 16:38:47 +08:00
committed by fit2cloud-chenyw
parent 5c88ff8054
commit c6909c5e28
10 changed files with 288 additions and 25 deletions
+1 -1
View File
@@ -1,3 +1,4 @@
import re
from fastapi_cache import FastAPICache
from functools import partial, wraps
from typing import Optional, Any, Dict, Tuple
@@ -27,7 +28,6 @@ def custom_key_builder(
# 支持args[0]格式
if keyExpression.startswith("args["):
import re
if match := re.match(r"args\[(\d+)\]", keyExpression):
index = int(match.group(1))
value = bound_args.args[index]