Liu Dongmiao
Liu Dongmiao
> rule.h needs a virtual ~Rule destructor to fix the rule memory leak. A virtual ~RuleWithAction destructor is not enough. It's shared_ptr. In my test, it doesn't require. I will...
Would be fixed in #2801, partially.
@PeterP55P do you use ModSecurity-nginx with `error_page`? If so, please check https://github.com/SpiderLabs/ModSecurity-nginx/pull/273.
Current source codes. ```c++ size_t pos_query = m_uri_decoded.find("?"); /* ... skip multi lines ... */ std::string path_info; if (pos_query == std::string::npos) { path_info = std::string(m_uri_decoded, 0); } else { path_info...
should same as #2580
@mmckenna-yottaa From my test, either virtual would fix the issue, so I make a small change. And I cannot understand, from shared_ptr's document, it's unnecessary to use virtual. However, in...
It's a bug introduced in commit 7a48245aed517c5cba0455b5d4e99cdaea14129e, actually this line: https://github.com/SpiderLabs/ModSecurity/commit/7a48245aed517c5cba0455b5d4e99cdaea14129e#diff-a05323d17ad48a02cb12643dc6c352302d91fbfc7a4e46cd7e725e56f63b4589L97 When a `RuleWithOperator` is created, then it's stored into `std::shared_ptr`, this `std::shared_ptr` know nothing about it's actual type `RuleWithOperator`,...
@zimmerle @martinhsv @mmckenna-yottaa I just write a simple POC for solutions. Name it as modsec-2728.cpp ```c++ #include #include #include #ifndef RULE_SHARED_PTR_CLASS #define RULE_SHARED_PTR_CLASS RuleWithActions #endif class Rule { public: #ifdef...
> We've tested this from the reference before and this did not solve the memory issues for us. @iammattmartin I have post poc codes in #2710 , and codes here...