Safe3 / uuWAF

A industry-leading free, high-performance, AI and semantic technology web application and API security protection product - uuWAF. 一款工业级免费、高性能、高扩展,支持AI和语义引擎的Web应用和API安全防护产品-南墙。Web应用防火墙、WAF、WAAP
https://waf.uusec.com
Other
640 stars 59 forks source link

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

Open SRC123123123 opened 4 months ago

SRC123123123 commented 4 months ago

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

photo_2024-04-10_19-44-33

SRC123123123 commented 4 months ago

这是我用的规则

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

Safe3 commented 4 months ago

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