3339 Commits

Author SHA1 Message Date
Eduardo Arias
7bff2f77aa Updated references to coreruleset repository
- For OWASP v2 rules, switch to a v2 tag for the paths referenced in
  the rest of the script to apply.
2024-05-03 23:05:34 -03:00
Eduardo Arias
fef419f986 Minor changes related to std::shared_ptr usage in RuleWithActions
- RuleWithActions::evaluate(Transaction *transaction)
  - Removed temporary rm local variable used to immediately create
  std::shared_ptr<RuleMessage>.
- Leverage std::make_shared & auto to simplify code.
2024-05-03 23:05:34 -03:00
Eduardo Arias
10c6ee726f Added support for expandEnv, createDir & cpu_seconds on Windows
- expandEnv on Windows uses POCO C++ Libraries implementation of Glob
  - Paths of matched files are adjusted to preserve UNIX path
  separators for consistency with the rest of the code.
  - Minor change to code shared with other platforms that removes
  allocation of std::ifstream on the heap to check whether the file can
  be opened, which can be done with local stack variable that closes
  the file when out of scope.
- createDir uses _mkdir on Windows, which doesn't support configuring
  the new directory's mode.
- added public domain implementation of clock_gettime for clock_id
  CLOCK_PROCESS_CPUTIME_ID from mingw-w64's winpthreads to support
  cpu_seconds on Windows.
- Updated included headers to support compilation on Windows (using
  Visual C++)
2024-05-03 23:05:34 -03:00
Eduardo Arias
ebf1f8fd28 On Windows use the operating system's native CA store for certificate verification of https requests.
- Updated included headers to support compilation on Windows (using
  Visual C++)
2024-05-03 23:05:34 -03:00
Eduardo Arias
91a736692a Minor changes to debug_log_writer
- Removed unused m_first data member.
- Explicitly delete copy constructor and assignment operator.
- Removed unused included headers.
2024-05-03 23:05:34 -03:00
Eduardo Arias
373633ffe2 mkstemp is not available in Windows build, replaced with _mktemp_s plus _open.
- Updated included headers to support compilation on Windows (using
  Visual C++)
- Minor change to use C++ default (zero) initialization instead of
  calling memset.
2024-05-03 23:05:34 -03:00
Eduardo Arias
35949179a4 setenv is not available in Windows build, replaced with _putenv_s 2024-05-03 23:05:34 -03:00
Eduardo Arias
abbd7b2f42 Replaced usage of apr_snprintf with snprintf (already in Windows exclusive code block)
- updated included headers to support compilation on Windows (using
  Visual C++)
2024-05-03 23:05:34 -03:00
Eduardo Arias
942c8ba606 Replaced usage of usleep (not available in Visual C++) with C++11's std::this_thread::sleep_for & std::chrono::microseconds.
- disabled build error from warning C4716 because process_request does
  not return a value and Visual C++ doesn't support [[noreturn]]
2024-05-03 23:05:34 -03:00
Eduardo Arias
a48856822c Updated included headers to support compilation on Windows (using Visual C++)
- most of posix related functions and constants in unistd.h can be
  found in io.h in Visual C++
- introduced src/compat/msvc.h to adjust for compiler differences (and
  avoid updating code with #ifdef blocks for Windows support)
- removed some included headers that are not needed (both on Unix and
  Windows builds)
2024-05-03 23:05:34 -03:00
Ervin Hegedus
c8056483f7
Merge pull request #3134 from eduar-hte/inline-cppcheck-suppressions
Remove cppcheck suppressions with line numbers in test/cppcheck_suppressions.txt
2024-05-03 14:43:51 +02:00
Eduardo Arias
1f419bba8f Implement sonarcloud suggestions 2024-05-02 17:18:31 -03:00
Eduardo Arias
9f5dc200ba Replace final three suppressions entries with line numbers
- These were initially not included in these changes, as they were
other PRs (#3104 & #3132) that address them.
2024-04-29 22:28:42 -03:00
Eduardo Arias
95ce3a7db4 Removed unused suppressions 2024-04-28 14:56:47 -03:00
Eduardo Arias
7a9c0ab15f Removed unused suppresion and avoid copy of logPath 2024-04-28 14:56:37 -03:00
Eduardo Arias
4aad8e0d06 Inline cppcheck suppressions 2024-04-28 14:56:23 -03:00
Eduardo Arias
0c38023b21 Removed unmatchedSuppression entries 2024-04-28 14:56:11 -03:00
Eduardo Arias
cd2dded659 Removed unnecessary break after return 2024-04-28 14:56:00 -03:00
Eduardo Arias
0cd2f459f3 Address cppcheck suppressions in lmdb 2024-04-28 14:55:49 -03:00
Eduardo Arias
94b68b2514 Minor updates to simplify code and remove cppcheck suppressions 2024-04-28 14:55:38 -03:00
Eduardo Arias
fde9d279b0 Removed unnecessary cppcheck suppression and r-value reference as copy should be avoidded by RVO 2024-04-28 14:55:18 -03:00
Eduardo Arias
b872f11f68 Fixed memory leak in examples/reading_logs_via_rule_message 2024-04-28 14:55:06 -03:00
Eduardo Arias
4288f5a009 Enable inline suppressions in cppcheck 2024-04-28 14:54:46 -03:00
Ervin Hegedus
07e5a7058b
Merge pull request #3128 from fzipi/update-submodules
fix: update submodule url - thanks for maintaining!
2024-04-23 10:54:30 +02:00
Felipe Zipitria
7e085ffb6e
fix: update submodule url
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
2024-04-22 15:56:40 -03:00
Ervin Hegedus
6217b4ec1e
Merge pull request #3127 from fzipi/fix-rbl-check
fix(rbl): typo in rbl check selector
2024-04-22 15:56:25 +02:00
Felipe Zipitria
30fe6f935b
fix(rbl): typo in rbl check selector
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
2024-04-22 10:23:28 -03:00
Ervin Hegedus
625f9a5300
Merge pull request #2898 from brandonpayton/add-editorconfig
Add editorconfig to help OSS contributors
2024-03-05 16:13:07 +01:00
Ervin Hegedus
6d719bee5b
Merge pull request #3016 from M4tteoP/uri_decode_invalid
fix: makes uri decode platform independent
2024-03-05 16:11:01 +01:00
Christian Folini
5a6a53859a
Merge pull request #3101 from airween/v3/updatechanges
doc: Update CHANGES
2024-03-02 10:41:37 +01:00
Ervin Hegedus
387c4727f5
Update CHANGES 2024-03-01 22:25:55 +01:00
Ervin Hegedus
3fe51179ee
Update CHANGES 2024-03-01 21:55:21 +01:00
Ervin Hegedus
97687496e9
Merge pull request #3098 from devzero2000/ep/scoped-for
Ep/scoped for: second pr
2024-03-01 21:43:00 +01:00
Elia Pinto
2daebc090f src/utils/acmp.cc: reduce the scope of variable in a for () loop
In general, it is always preferable to reduce
the scope of a variable in a for loop
2024-02-29 20:20:41 +01:00
Elia Pinto
7fed599fdb src/request_body_processor/multipart.cc: reduce the scope of variable in a for () loop
In general, it is always preferable to reduce
the scope of a variable in a for loop
2024-02-29 20:20:41 +01:00
Elia Pinto
b23abf440a src/operators/verify_cc.cc: reduce the scope of variable in a for () loop
In general, it is always preferable to reduce
the scope of a variable in a for loop
2024-02-29 20:20:41 +01:00
Elia Pinto
9842b92bd1 src/actions/transformations/hex_decode.cc: reduce the scope of variable in a for () loop
In general, it is always preferable to reduce
the scope of a variable in a for loop
2024-02-29 20:20:41 +01:00
Ervin Hegedus
734646dbf1
Merge pull request #3096 from gberkes/v3/sonar_return_never_will_be_executed
Clean up 'return' never will be executed.
2024-02-27 22:25:05 +01:00
gberkes
64dfe41cec Refactor: Use pthread_exit(nullptr) instead of pthread_exit(NULL) for type safety. 2024-02-27 19:21:58 +00:00
Ervin Hegedus
f474cc59b8
Merge pull request #3079 from MirkoDziadzka/mirko-bump-c++-version
No other remark was added, merging. Thanks @MirkoDziadzka.
2024-02-27 19:34:48 +01:00
Marc Stern
b3a267d506
Merge pull request #3095 from airween/v3/buildmacros
fix: Replace obsolete macros
2024-02-27 15:47:48 +01:00
gberkes
bf6042dd16 Marked the process_request() function with the [[noreturn]] attribute, as pthread_exit() does not return. 2024-02-26 15:38:39 +00:00
gberkes
7b56db1811 Clean up 'return' never will be executed. 2024-02-26 08:49:05 +00:00
Ervin Hegedus
d0f3cf1389
Replace obsolete macros 2024-02-25 22:01:07 +01:00
Christian Folini
985cb946cc
Merge pull request #3092 from airween/v3/secstatusengoff
fix: Change 'SecEngineStatus' to Off by default
2024-02-22 18:47:21 +01:00
Ervin Hegedus
d7ef620e8b
docs: Add info about modification 2024-02-22 14:04:49 +01:00
Ervin Hegedus
f850932f83
fix: Change 'SecEngineStatus' to Off by default 2024-02-22 14:03:04 +01:00
Ervin Hegedus
d0e6c163fc
Merge pull request #3087 from fzipi/patch-2
chore: update bug-report-for-version-2-x.md
2024-02-20 16:09:33 +01:00
Ervin Hegedus
626c12f1d4
Merge pull request #3086 from fzipi/patch-1
chore: update bug-report-for-version-3-x.md
2024-02-20 15:42:19 +01:00
Felipe Zipitría
c63a9d6341
chore: update bug-report-for-version-2-x.md
- add label so it is properly classified
2024-02-20 11:02:28 -03:00