wafplugin cache bug
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
- The access to the system using the network segment 192.168.40 is blocked, as expected
- The network segment 192.168.42 is used to access the system. The forwarding is normal and meets expectations
- The network segment 192.168.40 is used to access the system, and the forwarding is normal
Cause of the problem:
- When network segment 192.168.42 accesses the system and no rule is matched, an empty rule is added to the MatchDataCache.RULE_DATA_MAP cache
- When the 192.168.40 network segment is used again, the null rule is obtained from the MatchDataCache.RULE_DATA_MAP cache, and the actual rule does not take effect
Temporary solutions:
- Modify defaultMatchRule in AbstractShenyuPlugin to write the empty rule rule to cached code comments
I don't understand. Why do we need to cache empty rules?
can you fix it?
can you fix it?
I'd like to, but I don't understand why an empty object is put in the cache when no data is retrieved
can you fix it?
I'd like to, but I don't understand why an empty object is put in the cache when no data is retrieved
I did this directly, I wonder if it is OK?
no, empty rule data or selector data means can't match the rule or selector
you can close the match cache to avoid cache error.
thanks