File tree 1 file changed +11
-6
lines changed 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 47
47
to = (from == PropertyNotSetRuleEngine) ? default : from; \
48
48
}
49
49
50
+ #define merge_bodylimitaction_value (to, from, default ) \
51
+ if (to == PropertyNotSetBodyLimitAction) { \
52
+ to = (from == PropertyNotSetBodyLimitAction) ? default : from; \
53
+ }
54
+
50
55
#ifdef __cplusplus
51
56
52
57
namespace modsecurity {
@@ -380,13 +385,13 @@ class RulesProperties {
380
385
to->m_requestBodyLimit .merge (&from->m_requestBodyLimit );
381
386
to->m_responseBodyLimit .merge (&from->m_responseBodyLimit );
382
387
383
- if (from ->m_requestBodyLimitAction != PropertyNotSetBodyLimitAction) {
384
- to-> m_requestBodyLimitAction = from->m_requestBodyLimitAction ;
385
- }
388
+ merge_bodylimitaction_value (to ->m_requestBodyLimitAction ,
389
+ from->m_requestBodyLimitAction ,
390
+ PropertyNotSetBodyLimitAction);
386
391
387
- if (from ->m_responseBodyLimitAction != PropertyNotSetBodyLimitAction) {
388
- to-> m_responseBodyLimitAction = from->m_responseBodyLimitAction ;
389
- }
392
+ merge_bodylimitaction_value (to ->m_responseBodyLimitAction ,
393
+ from->m_responseBodyLimitAction ,
394
+ PropertyNotSetBodyLimitAction);
390
395
391
396
to->m_uploadFileLimit .merge (&from->m_uploadFileLimit );
392
397
to->m_uploadFileMode .merge (&from->m_uploadFileMode );
You can’t perform that action at this time.
0 commit comments