3595 Commits

Author SHA1 Message Date
Ervin Hegedus
dc40880663
Fix cppcheck error in example multi.c 2025-03-12 20:45:47 +01:00
Ervin Hegedus
1a2b13967f
Merge pull request #3321 from gberkes/refactor/default-pcre2
Refactor/default pcre2
2025-03-12 18:16:35 +01:00
Ervin Hegedus
a555e5a445
Merge commit from fork
fix: fixed htmlEntityDecode methods
v3.0.14
2025-02-25 14:50:05 +01:00
Ervin Hegedus
646881085c
Change release version to v3.0.14 2025-02-25 10:52:04 +01:00
Ervin Hegedus
29c3cc32e1
doc: update CHANGES 2025-02-24 18:35:13 +01:00
Ervin Hegedus
c82e831b66
fix: fixed htmlEntityDecode methods 2025-02-24 16:44:17 +01:00
Ervin Hegedus
f96806cd28
Merge pull request #3342 from airween/v3/gcc15fix
fix: Added missing header to avoid build error with gcc-15
2025-02-21 08:07:24 +01:00
Ervin Hegedus
71037dc4d7
fix: Added missing header to avoid build error with gcc-15 2025-02-20 13:36:35 +01:00
Gabor Berkes
d68aef320c refactor: improve maintainability for SonarCloud compliance
- Marked the conversion operator in `Pcre2MatchContextPtr` as `explicit`
  to improve type safety and prevent unintended implicit conversions.
- Ensured consistent use of `nullptr` instead of `NULL` for better readability and modern C++ compliance.

These changes enhance code clarity, maintainability, and adherence to modern C++ best practices.
2025-02-20 12:25:53 +00:00
Gabor Berkes
b97b61b711
Merge branch 'owasp-modsecurity:v3/master' into refactor/default-pcre2 2025-02-20 09:56:01 +01:00
Ervin Hegedus
40af573759
Merge pull request #3335 from RooHTaylor/v3/master
Fix for issue #3334: build not finding YAJL
2025-01-30 14:20:59 +01:00
Andrew Taylor
199056b916 Fix for issue #3334: build not finding YAJL
When searching for YAJL during ./configure, pkg-config is checked first,
and then a list of directories is searched if pkg-config bears no fruit.
The previous version of yajl.m4 was looping over YAJL_POSSIBLE_LIB_NAMES
instead of YAJL_POSSIBLE_PATHS and passing the lib name to the
CHECK_FOR_YAJL_AT() function instead of the path. The would lead to YAJL
never being found if pkg-config could not find it.
2025-01-30 01:19:50 -05:00
Ervin Hegedus
9e685bf86d
Merge pull request #3322 from airween/v3/validatebyterange
fix: add value checking to @validateByteRange
2025-01-06 19:16:49 +01:00
Ervin Hegedus
9158477561
Add check after intervall parsing, spell fix 2025-01-06 17:36:49 +01:00
Ervin Hegedus
4c5bc45dfd
Add value checking to @validateByteRange 2025-01-06 16:36:36 +01:00
Ervin Hegedus
f260a75c14
Merge pull request #3314 from ElevationsRPG/v3/master
Update README.md
2025-01-06 11:49:41 +01:00
Gabor Berkes
6a2eee629c
Merge branch 'owasp-modsecurity:v3/master' into refactor/default-pcre2 2025-01-06 09:02:00 +01:00
Elevations
d9acf3d0cd
Merge branch 'owasp-modsecurity:v3/master' into v3/master 2025-01-06 13:28:23 +13:00
Ervin Hegedus
eb7e2b8a5f
Merge pull request #3319 from airween/v3/osxcifix
fix: build library on OSX without GeoIP brew package
2025-01-05 17:05:30 +01:00
Ervin Hegedus
a332567b85
Set correct order of commands 2025-01-05 16:41:05 +01:00
Ervin Hegedus
72bb873460
Use latest released version by commit id.
Co-authored-by: Max Leske <250711+theseion@users.noreply.github.com>
2025-01-05 16:09:03 +01:00
Ervin Hegedus
849131c8cf
Change depth value to 1 2025-01-04 23:46:09 +01:00
Ervin Hegedus
d76f3e741e
Update .github/workflows/ci.yml
Co-authored-by: Max Leske <250711+theseion@users.noreply.github.com>
2025-01-04 20:46:36 +01:00
Ervin Hegedus
900e7bcd06
Fix OSX build without GeoIP brew package 2025-01-04 13:48:39 +01:00
Gabor Berkes
10d1c2be74 Refactor: improve PCRE settings output in configure.ac
Enhanced the `configure.ac` script to provide clearer and more readable output for PCRE and PCRE2 settings during configuration. This change improves usability by ensuring that the configuration process displays relevant details in a structured and user-friendly format.

This update aligns with the broader PCRE to PCRE2 migration effort, making the build configuration process more transparent and consistent.
2024-12-20 08:12:06 +00:00
Gabor Berkes
e92507868e Fix macOS GitHub Actions build: add PCRE2_CFLAGS/LDADD/LDFLAGS
Introduced PCRE2_CFLAGS, PCRE2_LDADD, and PCRE2_LDFLAGS in all relevant Makefile.am files to align with the existing PCRE_* variable usage. This change addresses potential issues with linking and configuration for builds on macOS GitHub runners.

These modifications aim to resolve the build failure observed exclusively in the macOS environment while maintaining compatibility across other platforms. Testing will confirm if this adjustment corrects the issue.
2024-12-11 12:48:20 +00:00
Gabor Berkes
784cf0b64c Debug: increase verbosity in pcre2.m4 for macOS GitHub Actions
Added AC_MSG_NOTICE macros to pcre2.m4 to enhance debugging output. This change aims to identify the cause of build failures on macOS runners in GitHub Actions, which do not occur locally or on other platforms (Linux, Windows).

The added verbosity will help trace the build process and inspect variable values for inconsistencies in the macOS runner environment.
2024-12-11 08:57:43 +00:00
Elevations
c0681b6239
Update README.md
Remove conan center change
2024-12-11 19:29:32 +13:00
Elevations
7b4c3a2c0f
Update Dockerfile
Update Docker to latest conan version 2.10.2
2024-12-11 19:06:59 +13:00
Elevations
17700eca5b
Update README.md
Update Windows README to use latest conan version and conan center.
2024-12-11 17:45:37 +13:00
Gabor Berkes
a07d0c7d34 Fix missing libpcre2 dependency on macOS GitHub runner
Identified an issue where the macOS GitHub runner no longer includes the libpcre2 library by default. Updated the workflow configuration to explicitly add libpcre2 as a dependency, ensuring successful builds and compatibility with the updated build system.

This change prevents build failures on macOS environments and aligns the runner's setup with project requirements.
2024-12-10 21:40:09 +00:00
Gabor Berkes
106ed22b6d Fix typo in pcre.m4: corrected PCRE_CFLAGS assignment 2024-12-10 10:58:20 +00:00
Gabor Berkes
c6433df7b2 Refactor build system to use libpcre2 as the default
Updated the build system and related source files to use libpcre2 as the
default regex library instead of the deprecated libpcre. This change
ensures future compatibility and aligns with the library's maintenance status.

To build with the old libpcre, the `--with-pcre` configuration parameter
can be specified.
2024-12-10 10:16:14 +00:00
Gabor Berkes
4fb22466a0 Cleanup: Remove useless/nonfunctional AM_CONDITIONAL macros
- Deleted AM_CONDITIONAL macros from configure.ac that had no functional
  impact on the build system.
2024-12-10 07:32:13 +00:00
Ervin Hegedus
d9101a4fe1
Merge pull request #3306 from airween/v3/time_mon_fix
fix: align TIME_MON variable's behavior
2024-11-24 16:28:47 +00:00
Ervin Hegedus
daf550ef5f
Fix regex for test 2024-11-24 14:06:50 +01:00
Ervin Hegedus
db7e4cb67b
Align TIME_MON variable's behavior 2024-11-23 10:58:35 +01:00
Ervin Hegedus
fd4564131f
Merge pull request #3307 from gberkes/v3/cppcheck_v2_16_upgrade
Fix: Add false positive cppcheck-suppress for compatibility with upda…
2024-11-23 09:28:08 +00:00
Gabor Berkes
530919439b Fix: Add false positive cppcheck-suppress for compatibility with updated cppcheck version
- Added a cppcheck-suppress directive to handle a false positive detected
  by cppcheck 2.16.
- This change addresses an issue caused by the recent Homebrew update
  on macOS CI runner, which upgraded cppcheck from version 2.15 to 2.16.
2024-11-22 23:36:40 +00:00
Ervin Hegedus
41fd21b0fb
Merge pull request #3298 from airween/v3/sethostnamefix
Fix m_requestHostName variable behavior
2024-11-19 20:49:00 +00:00
Ervin Hegedus
d422b36966
Add condition before set hostname; move setRequestHostName() before processConnection() 2024-11-12 16:55:02 +01:00
Ervin Hegedus
4a720004dd
Merge pull request #3287 from hnakamur/fix_modsecurity-regression-test-secremoterules.txt_url_in_example
Fix modsecurity-regression-test-secremoterules.txt URL in example
2024-11-06 10:20:58 +00:00
Hiroaki Nakamura
42a401892b
Fix modsecurity-regression-test-secremoterules.txt URL in example 2024-11-06 14:33:28 +09:00
Ervin Hegedus
5bec188146
Merge pull request #3291 from hnakamur/add_test_regression_rules
Add regression rules for test
2024-11-05 11:03:04 +00:00
Hiroaki Nakamura
742f97ccc0
Add regression rules for test
Copied from:
- faa96c7838/modsecurity-regression-rules.txt
- b9321f190e/modsecurity-regression-ip-list.txt

diff --git a/test/test-cases/regression/operator-ipMatchFromFile.json b/test/test-cases/regression/operator-ipMatchFromFile.json
index 4a225954..1eb4d44a 100644
--- a/test/test-cases/regression/operator-ipMatchFromFile.json
+++ b/test/test-cases/regression/operator-ipMatchFromFile.json
@@ -129,7 +129,7 @@
     },
     "rules":[
       "SecRuleEngine On",
-      "SecRule REMOTE_ADDR \"@ipMatchFromFile b9321f190e/modsecurity-regression-ip-list.txt\" \"id:1
2024-11-02 20:17:24 +09:00
Ervin Hegedus
29a86b17df
Merge pull request #3283 from eduar-hte/cppcheck2142
Use latest version of cppcheck (2.15.0) to analyze codebase
2024-10-22 13:54:52 +02:00
Eduardo Arias
aca93f568e Remove no longer needed cppcheck inline suppressions. 2024-10-21 17:04:26 -03:00
Eduardo Arias
7ec50eb53f Make GeoLookup::debug function static (and non-member), as suggested by cppcheck. 2024-10-21 17:04:26 -03:00
Eduardo Arias
4e68edf0e5 Replace usage of sscanf with strtol to remove cppcheck inline suppression 2024-10-21 17:04:26 -03:00
Eduardo Arias
cdaf32f521 Remove cppcheck suppression by replacing use of local variable to alias this->m_variables
- The name of the local variable would clash with the namespace of the
  same name, which may have lead cppcheck to think the variable was not
  used.
2024-10-21 17:04:26 -03:00