在base64decode之后使用requestBodyProcessor
ModSecurity允许我们使用不同的请求车身处理器(例如XML或JSON)。我的问题是,是否有可能首先解码一个容纳base64编码的字符串
eyjuyw1lijoism9obiisicjhz2uioji1fq ==
转化为
> {“ name”:“ name”:“ john”,“ age”:25} <“:25} < ”: /code>
之后使用requestbodyProcessor = JSON
?
我尝试了不同的转换规则,依此类推,但无法正常工作。
ModSecurity allows us to use different request body processors (e.g. for XML or JSON). My question is, is it possible to first decode a body that holds a base64 encoded string
eyJuYW1lIjoiSm9obiIsICJhZ2UiOjI1fQ==
which translates to
{"name":"John", "age":25}
and after that use requestBodyProcessor=JSON
?
I tried different rules with transformations and so on, but couldn't get it to work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,这是不可能的,因为:
。为了实现所需的目标,但使用解析的JSON数据与现有规则兼容,这是有点复杂的,而不是向后兼容。您可以执行此操作:
Unfortunately, this isn't possible, because:
There IS a way how to achieve what you need but it's a little complex and not backward compatible with existing rules using parsed JSON data. You can do this: