We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.38.0
校验请求 path 的算法
我经过以下步骤测试: 路径中输入包含点(.)的内容比如:/api/.adm/adm.log
得出以下结果: 非法请求:/api/.adm/adm.log 状态码为:200
其中第 xx 行的代码输出表现 和文档上描述的不一致:
我的理解是: 我认为这个过滤应该是在404 ,因为系统不存在这个路由。
请问,是我的理解不对,还是文档出了问题?
The text was updated successfully, but these errors were encountered:
这是被过滤器拦了,带 /. 的是不安全 path,不予放行
Sorry, something went wrong.
不予放行我能理解,但是这个路由其实不存在,应该先报404 如果不予放行,状态码是不是应该也是500 而不是200 ,如果是200 的话,很多安全评测软件就过不了。
我差了一下httpstatus 状态码, 403 表示服务器理解请求客户端的请求,但是拒绝执行此请求 ,是不是用这个也挺合适的。
那你可以自定义一下path校验不通过时的处理方案
SaStrategy.instance.requestPathInvalidHandle = (e, extArg1, extArg2) -> {} 自定义响应状态和报文
好的,感谢
No branches or pull requests
使用版本:
1.38.0
涉及的功能模块:
校验请求 path 的算法
测试步骤:
我经过以下步骤测试:
路径中输入包含点(.)的内容比如:/api/.adm/adm.log
得出以下结果:
非法请求:/api/.adm/adm.log
状态码为:200
其中第 xx 行的代码输出表现 和文档上描述的不一致:
我的理解是:
我认为这个过滤应该是在404 ,因为系统不存在这个路由。
请问,是我的理解不对,还是文档出了问题?
The text was updated successfully, but these errors were encountered: