23 Commits

Author SHA1 Message Date
Felipe Zimmerle
9f47f1473c
Removes memory leaks on the parse
- Parser location is now a custom class. It holds a shared pointer
  with the file name; If the parser fails, the resource is deleted.

 - To follow the parser change, the Rule class now holds the file
  name in a shared pointer instead of a unique pointer. As a shared
  pointer we avoid duplication of the file name in memory, plus,
  it frees itself when not in use anymore.

 - Operator init also accepting the filename as a shared pointer.

 - Driver is treating m_location was privative. Now it holds a
  std::list<std::shared_ptr<yy::seclang_parser::location_type>>
  instead of: std::list<yy::seclang_parser::location_type *>.

 - Fix: addSecRule on Driver() was changed from RuleWithAction to
  RuleWithOperator.

 - Minor changes on the regression and rules-check utility to force
  deletion of resources even when they fail.

 - Couple of virtual destructors were placed to force the shared
  pointer decrementing on shared variables.

 - Deleted constructors for copy were placed for the sake of
  readability.
2021-01-12 13:01:26 -03:00
martinhsv
9ca34d2032
Fix memory leaks in ValidateSchema 2021-01-12 13:01:26 -03:00
Felipe Zimmerle
bf98e3424f
Makes RuleWithActions const in run time operations 2021-01-12 13:01:21 -03:00
Felipe Zimmerle
1d33015934
Makes operator to use string_view 2021-01-12 13:01:19 -03:00
Felipe Zimmerle
357c140003
Changens copyright year 2020-01-31 10:32:37 -03:00
Felipe Zimmerle
ef7f65db90
Changes debuglogs schema to avoid unecessary str allocation 2018-10-23 17:00:16 -03:00
Felipe Zimmerle
ac100785d1
Fix compilation issue while xml is disabled 2018-02-21 16:15:05 -03:00
Felipe Zimmerle
41bf7f716b
Calls xml init and xml cleanup to avoid memory leak
Fix #1553
2017-10-10 15:03:50 -03:00
michaelgranzow-avi
3a048ee2db
Support --enable-debug-logs=no option of configure script (#2)
* Support --enable-debug-logs=no option of configure script

* Undo unintended white space changes

* Undo more unintended white space changes

* Address review comments - thanks Mirko

* Address more review comments - thanks Mirko
2017-08-23 23:50:16 -03:00
Felipe Zimmerle
c97db2f361
Adds verbose message when a resource is not found.
Fix #1309
2017-05-02 13:39:37 -03:00
Felipe Zimmerle
424418f54b
Renames msc_system.[h|cc] to system.[h|cc] 2016-11-04 16:00:36 -03:00
Felipe Zimmerle
4ced1d18e0
Using full path in the header inclusion 2016-11-04 14:45:01 -03:00
Felipe Zimmerle
f1e742c159
Moves system related functions from utils' to utils/system' 2016-11-03 10:48:10 -03:00
Felipe Zimmerle
8757840bc3
Refactoring on the operators: negation is now being handled globally
Other minors changes were also made, including adding the prefix `m_'
to all the members of the class.
2016-10-19 10:30:26 -03:00
Felipe Zimmerle
9919026620
Fixes regarding memory management
Fixes assorted issues identified by valgrind.
2016-06-16 00:03:57 -03:00
Felipe Zimmerle
f989ecd5cb Adds support to SecXMLExternalEntity 2016-05-18 17:02:15 -03:00
Felipe Zimmerle
6a40752500 Adds XML variable, xml body request processor and @validateSchema 2016-05-12 11:11:40 -03:00
Felipe Zimmerle
a51e707517 Renames class Assay to Transaction 2016-01-13 15:57:00 -03:00
Felipe Zimmerle
ac10d8863c Changes the operator evaluate method to only support two arguments
Second argument can be empty if there is not need for it.
2015-12-22 11:53:31 -03:00
Felipe Zimmerle
42ce0475b2 Coding style: changes the namespace in the comments 2015-12-10 13:20:32 -03:00
Felipe Zimmerle
b5a43871e6 Changes library namespace from ModSecurity to modsecurity 2015-12-01 10:55:59 -03:00
Felipe Zimmerle
dc0b13ad74 Cosmetic: fix copyright header 2015-07-22 23:03:09 -03:00
Felipe Zimmerle
95cb4c56ab Very first commit: libmodsecurity
Check the README.md file for further information about the libmodsecurity.
2015-06-26 14:35:15 -03:00