mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 13:26:01 +03:00
Added support to run regression tests without libxml2
- Annotated regression tests that depend on libxml2 support - Added Windows build without libxml2
This commit is contained in:
parent
124a434439
commit
7267c1dc21
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
@ -84,6 +84,7 @@ jobs:
|
||||
- {label: "full", opt: "" }
|
||||
- {label: "wo lmdb", opt: "-DWITHOUT_LMDB=ON" }
|
||||
- {label: "wo lua", opt: "-DWITHOUT_LUA=ON" }
|
||||
- {label: "wo libxml2", opt: "-WITHOUT_LIBXML2=ON" }
|
||||
- {label: "wo maxmind", opt: "-DWITHOUT_MAXMIND=ON" }
|
||||
- {label: "wo curl", opt: "-DWITHOUT_CURL=ON" }
|
||||
steps:
|
||||
|
@ -486,15 +486,12 @@ int main(int argc, char **argv) {
|
||||
#if defined(WITH_GEOIP) or defined(WITH_MAXMIND)
|
||||
resources.push_back("geoip-or-maxmind");
|
||||
#endif
|
||||
|
||||
#if defined(WITH_MAXMIND)
|
||||
resources.push_back("maxmind");
|
||||
#endif
|
||||
|
||||
#if defined(WITH_GEOIP)
|
||||
resources.push_back("geoip");
|
||||
#endif
|
||||
|
||||
#ifdef WITH_CURL
|
||||
resources.push_back("curl");
|
||||
#endif
|
||||
@ -504,6 +501,9 @@ int main(int argc, char **argv) {
|
||||
#ifdef WITH_LUA
|
||||
resources.push_back("lua");
|
||||
#endif
|
||||
#ifdef WITH_LIBXML2
|
||||
resources.push_back("libxml2");
|
||||
#endif
|
||||
|
||||
#ifdef NO_LOGS
|
||||
std::cout << "Test utility cannot work without logging support." \
|
||||
|
@ -2,6 +2,7 @@
|
||||
{
|
||||
"enabled":1,
|
||||
"version_min":300000,
|
||||
"resource":"libxml2",
|
||||
"title":"Testing CtlRequestBodyProcessor=XML (1)",
|
||||
"expected":{
|
||||
"debug_log": "Registered XML namespace href \"http://schemas.xmlsoap.org/soap/envelope/\" prefix \"soap\""
|
||||
@ -71,6 +72,7 @@
|
||||
{
|
||||
"enabled":1,
|
||||
"version_min":300000,
|
||||
"resource":"libxml2",
|
||||
"title":"Testing CtlRequestBodyProcessor=XML (2)",
|
||||
"expected":{
|
||||
"debug_log": "Rule returned 0"
|
||||
@ -139,6 +141,7 @@
|
||||
{
|
||||
"enabled":1,
|
||||
"version_min":300000,
|
||||
"resource":"libxml2",
|
||||
"title":"Testing CtlRequestBodyProcessor=XML (3)",
|
||||
"expected":{
|
||||
"debug_log": "XML: Failed parsing document."
|
||||
|
@ -38,6 +38,7 @@
|
||||
{
|
||||
"enabled":1,
|
||||
"version_min":300000,
|
||||
"resource":"libxml2",
|
||||
"title":"Testing XML request body parser (validate ok)",
|
||||
"expected":{
|
||||
"debug_log": "Target value: \"39.95\" \\(Variable: XML:\/bookstore\/book\/price\\[text\\(\\)\\]\\)"
|
||||
|
@ -578,6 +578,7 @@
|
||||
{
|
||||
"enabled":1,
|
||||
"version_min":300000,
|
||||
"resource":"libxml2",
|
||||
"title":"SecRequestBodyNoFilesLimit - xml, limit exceeded",
|
||||
"client":{
|
||||
"ip":"200.249.12.31",
|
||||
@ -626,6 +627,7 @@
|
||||
{
|
||||
"enabled":1,
|
||||
"version_min":300000,
|
||||
"resource":"libxml2",
|
||||
"title":"SecRequestBodyNoFilesLimit - xml, limit not exceeded",
|
||||
"client":{
|
||||
"ip":"200.249.12.31",
|
||||
|
@ -2,6 +2,7 @@
|
||||
{
|
||||
"enabled":1,
|
||||
"version_min":300000,
|
||||
"resource":"libxml2",
|
||||
"title":"Testing SecXMLExternalEntity/XXE 1",
|
||||
"expected":{
|
||||
"debug_log": "Target value: \" jo smith\""
|
||||
@ -47,6 +48,7 @@
|
||||
{
|
||||
"enabled":1,
|
||||
"version_min":300000,
|
||||
"resource":"libxml2",
|
||||
"title":"Testing SecXMLExternalEntity/XXE 2",
|
||||
"expected":{
|
||||
"debug_log": "XML: Failed to load DTD: test-cases/data/SoapEnvelope.dtd",
|
||||
@ -94,6 +96,7 @@
|
||||
{
|
||||
"enabled":1,
|
||||
"version_min":300000,
|
||||
"resource":"libxml2",
|
||||
"title":"Testing SecXMLExternalEntity/XXE 3",
|
||||
"expected":{
|
||||
"debug_log": "XML Error: No declaration for element bookstore",
|
||||
|
@ -2,6 +2,7 @@
|
||||
{
|
||||
"enabled":1,
|
||||
"version_min":300000,
|
||||
"resource":"libxml2",
|
||||
"title":"Testing XML request body parser - validateDTD (validate ok)",
|
||||
"expected":{
|
||||
"debug_log": "XML: Successfully validated payload against DTD: test-cases/data/SoapEnvelope.dtd"
|
||||
@ -47,6 +48,7 @@
|
||||
{
|
||||
"enabled":1,
|
||||
"version_min":300000,
|
||||
"resource":"libxml2",
|
||||
"title":"Testing XML request body parser - validateDTD (validation failed)",
|
||||
"expected":{
|
||||
"debug_log": "XML Error: No declaration for element xBody",
|
||||
@ -93,6 +95,7 @@
|
||||
{
|
||||
"enabled":1,
|
||||
"version_min":300000,
|
||||
"resource":"libxml2",
|
||||
"title":"Testing XML request body parser - validateDTD (bad XML)",
|
||||
"expected":{
|
||||
"debug_log": "XML: DTD validation failed because content is not well formed",
|
||||
@ -139,6 +142,7 @@
|
||||
{
|
||||
"enabled":1,
|
||||
"version_min":300000,
|
||||
"resource":"libxml2",
|
||||
"title":"Testing XML request body parser - validateDTD (bad DTD)",
|
||||
"expected":{
|
||||
"debug_log": "Failed to load DTD: test-cases/data/SoapEnvelope-bad.dtd",
|
||||
|
@ -2,6 +2,7 @@
|
||||
{
|
||||
"enabled":1,
|
||||
"version_min":300000,
|
||||
"resource":"libxml2",
|
||||
"title":"Testing XML request body parser (validate ok)",
|
||||
"expected":{
|
||||
"debug_log": "XML: Successfully validated payload against Schema:"
|
||||
@ -51,6 +52,7 @@
|
||||
{
|
||||
"enabled":1,
|
||||
"version_min":300000,
|
||||
"resource":"libxml2",
|
||||
"title":"Testing XML request body parser (validate attribute value failed)",
|
||||
"expected":{
|
||||
"debug_log": "'badval' is not a valid value of the local atomic type",
|
||||
@ -101,6 +103,7 @@
|
||||
{
|
||||
"enabled":1,
|
||||
"version_min":300000,
|
||||
"resource":"libxml2",
|
||||
"title":"Testing XML request body parser (validate failed)",
|
||||
"expected":{
|
||||
"debug_log": "This element is not expected. Expected is one of",
|
||||
@ -151,6 +154,7 @@
|
||||
{
|
||||
"enabled":1,
|
||||
"version_min":300000,
|
||||
"resource":"libxml2",
|
||||
"title":"Testing XML request body parser (bad XML)",
|
||||
"expected":{
|
||||
"debug_log": "XML Error: Element '{http://schemas.xmlsoap.org/soap/envelope/}xBody'",
|
||||
@ -201,6 +205,7 @@
|
||||
{
|
||||
"enabled":1,
|
||||
"version_min":300000,
|
||||
"resource":"libxml2",
|
||||
"title":"Testing XML request body parser (bad schema)",
|
||||
"expected":{
|
||||
"debug_log": "XML: Failed to load Schema: test-cases/data/SoapEnvelope-bad.xsd. XML Error: Failed to parse the XML resource 'test-cases/data/SoapEnvelope-bad.xsd",
|
||||
|
@ -2,6 +2,7 @@
|
||||
{
|
||||
"enabled":1,
|
||||
"version_min":300000,
|
||||
"resource":"libxml2",
|
||||
"title":"Testing Variables :: REQBODY_PROCESSOR_ERROR_MSG (1/2)",
|
||||
"client":{
|
||||
"ip":"200.249.12.31",
|
||||
|
@ -2,6 +2,7 @@
|
||||
{
|
||||
"enabled":1,
|
||||
"version_min":300000,
|
||||
"resource":"libxml2",
|
||||
"title":"Testing XPath expression with equals sign",
|
||||
"expected":{
|
||||
"http_code": 403
|
||||
|
Loading…
x
Reference in New Issue
Block a user