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,27 @@ class RulesSetProperties {
218225
219226 /* *
220227 *
221- *
228+ * The ConfigBoolean enumerator defines the states for configuration boolean values.
229+ * The default value is PropertyNotSetConfigBoolean.
222230 */
223231 enum ConfigBoolean {
224232 TrueConfigBoolean,
225233 FalseConfigBoolean,
226234 PropertyNotSetConfigBoolean
227235 };
228236
237+ /* *
238+ *
239+ * The ConfigXMLParseXmlIntoArgs enumerator defines the states for the configuration
240+ * XMLParseXmlIntoArgs values.
241+ * The default value is PropertyNotSetConfigXMLParseXmlIntoArgs.
242+ */
243+ enum ConfigXMLParseXmlIntoArgs {
244+ TrueConfigXMLParseXmlIntoArgs,
245+ FalseConfigXMLParseXmlIntoArgs,
246+ OnlyArgsConfigXMLParseXmlIntoArgs,
247+ PropertyNotSetConfigXMLParseXmlIntoArgs
248+ };
229249
230250 /* *
231251 *
@@ -338,6 +358,19 @@ class RulesSetProperties {
338358 }
339359 }
340360
361+ static std::string configXMLParseXmlIntoArgsString (ConfigXMLParseXmlIntoArgs i) {
362+ switch (i) {
363+ case TrueConfigXMLParseXmlIntoArgs:
364+ return " True" ;
365+ case FalseConfigXMLParseXmlIntoArgs:
366+ return " False" ;
367+ case OnlyArgsConfigXMLParseXmlIntoArgs:
368+ return " OnlyArgs" ;
369+ case PropertyNotSetConfigXMLParseXmlIntoArgs:
370+ default :
371+ return " Not set" ;
372+ }
373+ }
341374
342375 static int mergeProperties (RulesSetProperties *from,
343376 RulesSetProperties *to, std::ostringstream *err) {
@@ -357,6 +390,10 @@ class RulesSetProperties {
357390 from->m_secXMLExternalEntity ,
358391 PropertyNotSetConfigBoolean);
359392
393+ merge_xmlargparse_value (to->m_secXMLParseXmlIntoArgs ,
394+ from->m_secXMLParseXmlIntoArgs ,
395+ PropertyNotSetConfigXMLParseXmlIntoArgs);
396+
360397 merge_boolean_value (to->m_uploadKeepFiles ,
361398 from->m_uploadKeepFiles ,
362399 PropertyNotSetConfigBoolean);
@@ -464,6 +501,7 @@ class RulesSetProperties {
464501 ConfigBoolean m_secRequestBodyAccess;
465502 ConfigBoolean m_secResponseBodyAccess;
466503 ConfigBoolean m_secXMLExternalEntity;
504+ ConfigXMLParseXmlIntoArgs m_secXMLParseXmlIntoArgs;
467505 ConfigBoolean m_tmpSaveUploadedFiles;
468506 ConfigBoolean m_uploadKeepFiles;
469507 ConfigDouble m_argumentsLimit;
0 commit comments