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 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E9=94=99=E8=AF=AF=E5=AF=BC=E8=87=B4=E7=9A=84?= =?UTF-8?q?openresty=20lua=20error=20=E4=BB=8E=E8=80=8C=E4=BD=BF=E5=BE=97u?= =?UTF-8?q?seragent=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) From fd7fa885ca1044cc39fc26e89ba9dab1ed086592 Mon Sep 17 00:00:00 2001 From: jd82k <135953914+jd82k@users.noreply.github.com> Date: Wed, 24 Apr 2024 16:50:05 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AC=94=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/op_waf/index.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/op_waf/index.py b/plugins/op_waf/index.py index 0bc21394d..60d409d46 100755 --- a/plugins/op_waf/index.py +++ b/plugins/op_waf/index.py @@ -974,9 +974,9 @@ def setRetry(): ## 修复数据类型错误 tmp = args - tmp['cycle'] = int(tmp['retry']) - tmp['limit'] = int(tmp['retry_time']) - tmp['endtime'] = int(tmp['retry_cycle']) + tmp['retry'] = int(tmp['retry']) + tmp['retry_time'] = int(tmp['retry_time']) + tmp['retry_cycle'] = int(tmp['retry_cycle']) cobj['retry'] = tmp cjson = mw.getJson(cobj)