uuWAF icon indicating copy to clipboard operation
uuWAF copied to clipboard

设置验证码识别 触发验证码界面后502bad导致无法出来验证码

Open SRC123123123 opened this issue 1 year ago • 2 comments

请求 URL: /api/v1/captcha/img?id=508718283436851723 请求方法: GET Status Code: 502 Bad Gateway

photo_2024-04-10_19-44-33

SRC123123123 avatar Apr 10 '24 11:04 SRC123123123

这是我用的规则

local sh = waf.ipCache local robotIp = 'rb:' .. waf.ip local c, f = sh:get(robotIp)

-- 如果是静态页面且没有进行滑动旋转验证码验证则返回 if not (waf.isQueryString or waf.reqContentLength > 0) and f ~= 2 then return false end

if not c then sh:set(robotIp, 1, 60, 1) -- 设置1分钟也就是60秒访问计数时间段 else if f == 2 then return waf.checkRobot(waf) -- 启动机器人滑动旋转验证码验证 end sh:incr(robotIp, 1) if c + 1 >= 3 then sh:set(robotIp, c + 1, 1800, 2)
return true, robotIp, true end end

return false

SRC123123123 avatar Apr 10 '24 11:04 SRC123123123

验证码不能显示,通常是获取客户端ip方式的选项没选对,这个是和客户端ip绑定的,你可以加官方微信群获取帮助

Safe3 avatar Apr 10 '24 13:04 Safe3