From 4ecbfb3e58a026a75cc7ce21e8e91913cb23bb95 Mon Sep 17 00:00:00 2001 From: jd82k <135953914+jd82k@users.noreply.github.com> Date: Wed, 24 Apr 2024 14:52:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E9=94=99=E8=AF=AF=E5=AF=BC=E8=87=B4=E7=9A=84openresty?= =?UTF-8?q?=20lua=20error=20=E4=BB=8E=E8=80=8C=E4=BD=BF=E5=BE=97useragent?= =?UTF-8?q?=E5=8C=B9=E9=85=8D=E5=A4=B1=E6=95=88=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/op_waf/index.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/plugins/op_waf/index.py b/plugins/op_waf/index.py index 949c28e78..0bc21394d 100755 --- a/plugins/op_waf/index.py +++ b/plugins/op_waf/index.py @@ -971,9 +971,14 @@ def setRetry(): conf = getJsonPath('config') content = mw.readFile(conf) cobj = json.loads(content) - - cobj['retry'] = args - + + ## 修复数据类型错误 + tmp = args + tmp['cycle'] = int(tmp['retry']) + tmp['limit'] = int(tmp['retry_time']) + tmp['endtime'] = int(tmp['retry_cycle']) + + cobj['retry'] = tmp cjson = mw.getJson(cobj) mw.writeFile(conf, cjson)