5252 to = (from == PropertyNotSetBodyLimitAction) ? default : from; \
5353 }
5454
55+ #define merge_xmlargparse_value (to, from, default ) \
56+ if (to == PropertyNotSetConfigXMLParseXmlIntoArgs) { \
57+ to = (from == PropertyNotSetConfigXMLParseXmlIntoArgs) ? default : from; \
58+ }
59+
5560#ifdef __cplusplus
5661
5762namespace modsecurity {
@@ -177,6 +182,7 @@ class RulesSetProperties {
177182 m_secRequestBodyAccess (PropertyNotSetConfigBoolean),
178183 m_secResponseBodyAccess (PropertyNotSetConfigBoolean),
179184 m_secXMLExternalEntity (PropertyNotSetConfigBoolean),
185+ m_secXMLParseXmlIntoArgs (PropertyNotSetConfigXMLParseXmlIntoArgs),
180186 m_tmpSaveUploadedFiles (PropertyNotSetConfigBoolean),
181187 m_uploadKeepFiles (PropertyNotSetConfigBoolean),
182188 m_debugLog (new DebugLog()),
@@ -191,6 +197,7 @@ class RulesSetProperties {
191197 m_secRequestBodyAccess(PropertyNotSetConfigBoolean),
192198 m_secResponseBodyAccess(PropertyNotSetConfigBoolean),
193199 m_secXMLExternalEntity(PropertyNotSetConfigBoolean),
200+ m_secXMLParseXmlIntoArgs(PropertyNotSetConfigXMLParseXmlIntoArgs),
194201 m_tmpSaveUploadedFiles(PropertyNotSetConfigBoolean),
195202 m_uploadKeepFiles(PropertyNotSetConfigBoolean),
196203 m_debugLog(debugLog),
@@ -218,14 +225,28 @@ class RulesSetProperties {
218225
219226 /* *
220227 *
221- *
228+ * The ConfigBoolean enumerator consists in mapping the different
229+ * states of the configuration boolean values.
230+ * The default value is PropertyNotSetConfigBoolean.
222231 */
223232 enum ConfigBoolean {
224233 TrueConfigBoolean,
225234 FalseConfigBoolean,
226235 PropertyNotSetConfigBoolean
227236 };
228237
238+ /* *
239+ *
240+ * The ConfigXMLParseXmlIntoArgs enumerator consists in mapping the
241+ * different states of the configuration XMLParseXmlIntoArgs values.
242+ * The default value is PropertyNotSetConfigXMLParseXmlIntoArgs.
243+ */
244+ enum ConfigXMLParseXmlIntoArgs {
245+ TrueConfigXMLParseXmlIntoArgs,
246+ FalseConfigXMLParseXmlIntoArgs,
247+ OnlyArgsConfigXMLParseXmlIntoArgs,
248+ PropertyNotSetConfigXMLParseXmlIntoArgs
249+ };
229250
230251 /* *
231252 *
@@ -338,6 +359,19 @@ class RulesSetProperties {
338359 }
339360 }
340361
362+ static std::string configXMLParseXmlIntoArgsString (ConfigXMLParseXmlIntoArgs i) {
363+ switch (i) {
364+ case TrueConfigXMLParseXmlIntoArgs:
365+ return " True" ;
366+ case FalseConfigXMLParseXmlIntoArgs:
367+ return " False" ;
368+ case OnlyArgsConfigXMLParseXmlIntoArgs:
369+ return " OnlyArgs" ;
370+ case PropertyNotSetConfigXMLParseXmlIntoArgs:
371+ default :
372+ return " Not set" ;
373+ }
374+ }
341375
342376 static int mergeProperties (RulesSetProperties *from,
343377 RulesSetProperties *to, std::ostringstream *err) {
@@ -357,6 +391,10 @@ class RulesSetProperties {
357391 from->m_secXMLExternalEntity ,
358392 PropertyNotSetConfigBoolean);
359393
394+ merge_xmlargparse_value (to->m_secXMLParseXmlIntoArgs ,
395+ from->m_secXMLParseXmlIntoArgs ,
396+ PropertyNotSetConfigXMLParseXmlIntoArgs);
397+
360398 merge_boolean_value (to->m_uploadKeepFiles ,
361399 from->m_uploadKeepFiles ,
362400 PropertyNotSetConfigBoolean);
@@ -464,6 +502,7 @@ class RulesSetProperties {
464502 ConfigBoolean m_secRequestBodyAccess;
465503 ConfigBoolean m_secResponseBodyAccess;
466504 ConfigBoolean m_secXMLExternalEntity;
505+ ConfigXMLParseXmlIntoArgs m_secXMLParseXmlIntoArgs;
467506 ConfigBoolean m_tmpSaveUploadedFiles;
468507 ConfigBoolean m_uploadKeepFiles;
469508 ConfigDouble m_argumentsLimit;
0 commit comments