杨梅冲
每天在想什么呢?
随笔 - 198,  文章 - 0,  评论 - 8,  阅读 - 17万

"GET /en/stores?page=185&country=US&sort=default&alpha= HTTP/1.1" 200 227757 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0"

翻页功能禁止使用:

/stores?page=1

/stores?page=2

/stores?page=3

完整链接:https://www.xx.com/stores?page=1

 

WAF web_acl配置

Rules:---->Add Rules---->Add my own rules and rule groups

Rule type:Rule builder

Rule:

Name: url_deny 自定义名称

Type:Regular rule

If a request matches all the statements (AND)

Statement 1

Field to match:URI path
Positional constraint:Contains string
Search string: /stores
Text transformations
  • None (Priority 0)

AND

Statement 2

Field to match :Query string
Positional constraint:Contains string
Search string: page
Text transformations
  • None (Priority 0)

action:block拒绝访问

意思是先满足链接中带有/stores,再满足链接中带有 page,才能拒绝访问,返回403 Forbidden

这样链接中带有/stores可以访问,但是同时满足 2 个条件就不能访问

 

 

规则:拒绝 page>=2 的请求

- 匹配条件:Query string 的正则匹配 (Matches regular expression) `page=([2-9]|[1-9][0-9]+)`

- 动作:Block

预设规则: Allow

此规则透过正则表达式撰写,若匹配到 Query String 中 page>=2 的整数,WAF 会阻挡该请求

posted on   杨梅冲  阅读(13)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示