mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 17:26:55 +08:00
refactor: Code security optimization
This commit is contained in:
committed by
fit2cloud-chenyw
parent
5c88ff8054
commit
c6909c5e28
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user