Showing preview only (4,354K chars total). Download the full file or copy to clipboard to get everything.
Repository: owasp-modsecurity/ModSecurity
Branch: v3/master
Commit: 1c1ccf6c6143
Files: 819
Total size: 4.0 MB
Directory structure:
gitextract_v37w8tr4/
├── .editorconfig
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug-report-for-version-2-x.md
│ │ └── bug-report-for-version-3-x.md
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
│ ├── ci.yml
│ └── ci_new.yml
├── .gitignore
├── .gitmodules
├── AUTHORS
├── CHANGES
├── LICENSE
├── Makefile.am
├── README.md
├── SECURITY.md
├── build/
│ ├── .empty
│ ├── ax_cxx_compile_stdcxx.m4
│ ├── ax_prog_doxygen.m4
│ ├── ax_valgrind_check.m4
│ ├── curl.m4
│ ├── libgeoip.m4
│ ├── libmaxmind.m4
│ ├── libxml.m4
│ ├── lmdb.m4
│ ├── lua.m4
│ ├── msc_find_lib.m4
│ ├── pcre.m4
│ ├── pcre2.m4
│ ├── release.sh
│ ├── ssdeep.m4
│ ├── win32/
│ │ ├── CMakeLists.txt
│ │ ├── ConfigureChecks.cmake
│ │ ├── README.md
│ │ ├── conanfile.txt
│ │ ├── config.h.cmake
│ │ └── docker/
│ │ ├── Dockerfile
│ │ ├── InstallBuildTools.cmd
│ │ └── git.inf
│ └── yajl.m4
├── build.sh
├── configure.ac
├── doc/
│ ├── .empty
│ ├── Makefile.am
│ └── doxygen.cfg
├── examples/
│ ├── Makefile.am
│ ├── multiprocess_c/
│ │ ├── Makefile.am
│ │ ├── basic_rules.conf
│ │ └── multi.c
│ ├── multithread/
│ │ ├── Makefile.am
│ │ ├── basic_rules.conf
│ │ └── multithread.cc
│ ├── reading_logs_via_rule_message/
│ │ ├── Makefile.am
│ │ ├── blocked_request.conf
│ │ ├── blocked_request_engine_on.conf
│ │ ├── match.conf
│ │ ├── no_match.conf
│ │ ├── reading_logs_via_rule_message.h
│ │ └── simple_request.cc
│ ├── reading_logs_with_offset/
│ │ ├── Makefile.am
│ │ └── read.cc
│ ├── simple_example_using_c/
│ │ ├── Makefile.am
│ │ ├── basic_rules.conf
│ │ ├── test-valgrind.sh
│ │ └── test.c
│ └── using_bodies_in_chunks/
│ ├── Makefile.am
│ ├── example.conf
│ └── simple_request.cc
├── headers/
│ └── modsecurity/
│ ├── actions/
│ │ └── action.h
│ ├── anchored_set_variable.h
│ ├── anchored_set_variable_translation_proxy.h
│ ├── anchored_variable.h
│ ├── audit_log.h
│ ├── collection/
│ │ ├── collection.h
│ │ └── collections.h
│ ├── debug_log.h
│ ├── intervention.h
│ ├── modsecurity.h
│ ├── rule.h
│ ├── rule_marker.h
│ ├── rule_message.h
│ ├── rule_unconditional.h
│ ├── rule_with_actions.h
│ ├── rule_with_operator.h
│ ├── rules.h
│ ├── rules_exceptions.h
│ ├── rules_properties.h
│ ├── rules_set.h
│ ├── rules_set_phases.h
│ ├── rules_set_properties.h
│ ├── transaction.h
│ ├── variable_origin.h
│ └── variable_value.h
├── modsecurity.conf-recommended
├── modsecurity.pc.in
├── others/
│ └── Makefile.am
├── src/
│ ├── Makefile.am
│ ├── actions/
│ │ ├── accuracy.cc
│ │ ├── accuracy.h
│ │ ├── action.cc
│ │ ├── audit_log.cc
│ │ ├── audit_log.h
│ │ ├── block.cc
│ │ ├── block.h
│ │ ├── capture.cc
│ │ ├── capture.h
│ │ ├── chain.cc
│ │ ├── chain.h
│ │ ├── ctl/
│ │ │ ├── audit_engine.cc
│ │ │ ├── audit_engine.h
│ │ │ ├── audit_log_parts.cc
│ │ │ ├── audit_log_parts.h
│ │ │ ├── parse_xml_into_args.cc
│ │ │ ├── parse_xml_into_args.h
│ │ │ ├── request_body_access.cc
│ │ │ ├── request_body_access.h
│ │ │ ├── request_body_processor_json.cc
│ │ │ ├── request_body_processor_json.h
│ │ │ ├── request_body_processor_urlencoded.cc
│ │ │ ├── request_body_processor_urlencoded.h
│ │ │ ├── request_body_processor_xml.cc
│ │ │ ├── request_body_processor_xml.h
│ │ │ ├── rule_engine.cc
│ │ │ ├── rule_engine.h
│ │ │ ├── rule_remove_by_id.cc
│ │ │ ├── rule_remove_by_id.h
│ │ │ ├── rule_remove_by_tag.cc
│ │ │ ├── rule_remove_by_tag.h
│ │ │ ├── rule_remove_target_by_id.cc
│ │ │ ├── rule_remove_target_by_id.h
│ │ │ ├── rule_remove_target_by_tag.cc
│ │ │ └── rule_remove_target_by_tag.h
│ │ ├── data/
│ │ │ ├── status.cc
│ │ │ └── status.h
│ │ ├── disruptive/
│ │ │ ├── allow.cc
│ │ │ ├── allow.h
│ │ │ ├── deny.cc
│ │ │ ├── deny.h
│ │ │ ├── drop.cc
│ │ │ ├── drop.h
│ │ │ ├── pass.cc
│ │ │ ├── pass.h
│ │ │ ├── redirect.cc
│ │ │ └── redirect.h
│ │ ├── exec.cc
│ │ ├── exec.h
│ │ ├── expire_var.cc
│ │ ├── expire_var.h
│ │ ├── init_col.cc
│ │ ├── init_col.h
│ │ ├── log.cc
│ │ ├── log.h
│ │ ├── log_data.cc
│ │ ├── log_data.h
│ │ ├── maturity.cc
│ │ ├── maturity.h
│ │ ├── msg.cc
│ │ ├── msg.h
│ │ ├── multi_match.cc
│ │ ├── multi_match.h
│ │ ├── no_audit_log.cc
│ │ ├── no_audit_log.h
│ │ ├── no_log.cc
│ │ ├── no_log.h
│ │ ├── phase.cc
│ │ ├── phase.h
│ │ ├── rev.cc
│ │ ├── rev.h
│ │ ├── rule_id.cc
│ │ ├── rule_id.h
│ │ ├── set_env.cc
│ │ ├── set_env.h
│ │ ├── set_rsc.cc
│ │ ├── set_rsc.h
│ │ ├── set_sid.cc
│ │ ├── set_sid.h
│ │ ├── set_uid.cc
│ │ ├── set_uid.h
│ │ ├── set_var.cc
│ │ ├── set_var.h
│ │ ├── severity.cc
│ │ ├── severity.h
│ │ ├── skip.cc
│ │ ├── skip.h
│ │ ├── skip_after.cc
│ │ ├── skip_after.h
│ │ ├── tag.cc
│ │ ├── tag.h
│ │ ├── transformations/
│ │ │ ├── base64_decode.cc
│ │ │ ├── base64_decode.h
│ │ │ ├── base64_decode_ext.cc
│ │ │ ├── base64_decode_ext.h
│ │ │ ├── base64_encode.cc
│ │ │ ├── base64_encode.h
│ │ │ ├── cmd_line.cc
│ │ │ ├── cmd_line.h
│ │ │ ├── compress_whitespace.cc
│ │ │ ├── compress_whitespace.h
│ │ │ ├── css_decode.cc
│ │ │ ├── css_decode.h
│ │ │ ├── escape_seq_decode.cc
│ │ │ ├── escape_seq_decode.h
│ │ │ ├── hex_decode.cc
│ │ │ ├── hex_decode.h
│ │ │ ├── hex_encode.cc
│ │ │ ├── hex_encode.h
│ │ │ ├── html_entity_decode.cc
│ │ │ ├── html_entity_decode.h
│ │ │ ├── js_decode.cc
│ │ │ ├── js_decode.h
│ │ │ ├── length.cc
│ │ │ ├── length.h
│ │ │ ├── lower_case.cc
│ │ │ ├── lower_case.h
│ │ │ ├── md5.cc
│ │ │ ├── md5.h
│ │ │ ├── none.cc
│ │ │ ├── none.h
│ │ │ ├── normalise_path.cc
│ │ │ ├── normalise_path.h
│ │ │ ├── normalise_path_win.cc
│ │ │ ├── normalise_path_win.h
│ │ │ ├── parity_even_7bit.cc
│ │ │ ├── parity_even_7bit.h
│ │ │ ├── parity_odd_7bit.cc
│ │ │ ├── parity_odd_7bit.h
│ │ │ ├── parity_zero_7bit.cc
│ │ │ ├── parity_zero_7bit.h
│ │ │ ├── remove_comments.cc
│ │ │ ├── remove_comments.h
│ │ │ ├── remove_comments_char.cc
│ │ │ ├── remove_comments_char.h
│ │ │ ├── remove_nulls.cc
│ │ │ ├── remove_nulls.h
│ │ │ ├── remove_whitespace.cc
│ │ │ ├── remove_whitespace.h
│ │ │ ├── replace_comments.cc
│ │ │ ├── replace_comments.h
│ │ │ ├── replace_nulls.cc
│ │ │ ├── replace_nulls.h
│ │ │ ├── sha1.cc
│ │ │ ├── sha1.h
│ │ │ ├── sql_hex_decode.cc
│ │ │ ├── sql_hex_decode.h
│ │ │ ├── transformation.cc
│ │ │ ├── transformation.h
│ │ │ ├── trim.cc
│ │ │ ├── trim.h
│ │ │ ├── trim_left.cc
│ │ │ ├── trim_left.h
│ │ │ ├── trim_right.cc
│ │ │ ├── trim_right.h
│ │ │ ├── upper_case.cc
│ │ │ ├── upper_case.h
│ │ │ ├── url_decode.cc
│ │ │ ├── url_decode.h
│ │ │ ├── url_decode_uni.cc
│ │ │ ├── url_decode_uni.h
│ │ │ ├── url_encode.cc
│ │ │ ├── url_encode.h
│ │ │ ├── utf8_to_unicode.cc
│ │ │ └── utf8_to_unicode.h
│ │ ├── ver.cc
│ │ ├── ver.h
│ │ ├── xmlns.cc
│ │ └── xmlns.h
│ ├── anchored_set_variable.cc
│ ├── anchored_variable.cc
│ ├── audit_log/
│ │ ├── audit_log.cc
│ │ └── writer/
│ │ ├── https.cc
│ │ ├── https.h
│ │ ├── parallel.cc
│ │ ├── parallel.h
│ │ ├── serial.cc
│ │ ├── serial.h
│ │ ├── writer.cc
│ │ └── writer.h
│ ├── collection/
│ │ ├── backend/
│ │ │ ├── collection_data.cc
│ │ │ ├── collection_data.h
│ │ │ ├── in_memory-per_process.cc
│ │ │ ├── in_memory-per_process.h
│ │ │ ├── lmdb.cc
│ │ │ └── lmdb.h
│ │ └── collections.cc
│ ├── compat/
│ │ └── msvc.h
│ ├── debug_log/
│ │ ├── debug_log.cc
│ │ ├── debug_log_writer.cc
│ │ └── debug_log_writer.h
│ ├── debug_log_writer_agent.h
│ ├── engine/
│ │ ├── lua.cc
│ │ └── lua.h
│ ├── modsecurity.cc
│ ├── operators/
│ │ ├── .directory
│ │ ├── begins_with.cc
│ │ ├── begins_with.h
│ │ ├── contains.cc
│ │ ├── contains.h
│ │ ├── contains_word.cc
│ │ ├── contains_word.h
│ │ ├── detect_sqli.cc
│ │ ├── detect_sqli.h
│ │ ├── detect_xss.cc
│ │ ├── detect_xss.h
│ │ ├── ends_with.cc
│ │ ├── ends_with.h
│ │ ├── eq.cc
│ │ ├── eq.h
│ │ ├── fuzzy_hash.cc
│ │ ├── fuzzy_hash.h
│ │ ├── ge.cc
│ │ ├── ge.h
│ │ ├── geo_lookup.cc
│ │ ├── geo_lookup.h
│ │ ├── gsblookup.cc
│ │ ├── gsblookup.h
│ │ ├── gt.cc
│ │ ├── gt.h
│ │ ├── inspect_file.cc
│ │ ├── inspect_file.h
│ │ ├── ip_match.cc
│ │ ├── ip_match.h
│ │ ├── ip_match_f.cc
│ │ ├── ip_match_f.h
│ │ ├── ip_match_from_file.cc
│ │ ├── ip_match_from_file.h
│ │ ├── le.cc
│ │ ├── le.h
│ │ ├── lt.cc
│ │ ├── lt.h
│ │ ├── no_match.cc
│ │ ├── no_match.h
│ │ ├── operator.cc
│ │ ├── operator.h
│ │ ├── pm.cc
│ │ ├── pm.h
│ │ ├── pm_f.h
│ │ ├── pm_from_file.cc
│ │ ├── pm_from_file.h
│ │ ├── rbl.cc
│ │ ├── rbl.h
│ │ ├── rsub.cc
│ │ ├── rsub.h
│ │ ├── rx.cc
│ │ ├── rx.h
│ │ ├── rx_global.cc
│ │ ├── rx_global.h
│ │ ├── str_eq.cc
│ │ ├── str_eq.h
│ │ ├── str_match.cc
│ │ ├── str_match.h
│ │ ├── unconditional_match.cc
│ │ ├── unconditional_match.h
│ │ ├── validate_byte_range.cc
│ │ ├── validate_byte_range.h
│ │ ├── validate_dtd.cc
│ │ ├── validate_dtd.h
│ │ ├── validate_hash.cc
│ │ ├── validate_hash.h
│ │ ├── validate_schema.cc
│ │ ├── validate_schema.h
│ │ ├── validate_url_encoding.cc
│ │ ├── validate_url_encoding.h
│ │ ├── validate_utf8_encoding.cc
│ │ ├── validate_utf8_encoding.h
│ │ ├── verify_cc.cc
│ │ ├── verify_cc.h
│ │ ├── verify_cpf.cc
│ │ ├── verify_cpf.h
│ │ ├── verify_ssn.cc
│ │ ├── verify_ssn.h
│ │ ├── verify_svnr.cc
│ │ ├── verify_svnr.h
│ │ ├── within.cc
│ │ └── within.h
│ ├── parser/
│ │ ├── Makefile.am
│ │ ├── driver.cc
│ │ ├── driver.h
│ │ ├── location.hh
│ │ ├── position.hh
│ │ ├── seclang-parser.cc
│ │ ├── seclang-parser.hh
│ │ ├── seclang-parser.yy
│ │ ├── seclang-scanner.cc
│ │ ├── seclang-scanner.ll
│ │ └── stack.hh
│ ├── request_body_processor/
│ │ ├── json.cc
│ │ ├── json.h
│ │ ├── multipart.cc
│ │ ├── multipart.h
│ │ ├── xml.cc
│ │ └── xml.h
│ ├── rule.cc
│ ├── rule_message.cc
│ ├── rule_script.cc
│ ├── rule_script.h
│ ├── rule_unconditional.cc
│ ├── rule_with_actions.cc
│ ├── rule_with_operator.cc
│ ├── rules_exceptions.cc
│ ├── rules_set.cc
│ ├── rules_set_phases.cc
│ ├── rules_set_properties.cc
│ ├── run_time_string.cc
│ ├── run_time_string.h
│ ├── transaction.cc
│ ├── unique_id.cc
│ ├── unique_id.h
│ ├── utils/
│ │ ├── acmp.cc
│ │ ├── acmp.h
│ │ ├── base64.cc
│ │ ├── base64.h
│ │ ├── decode.cc
│ │ ├── decode.h
│ │ ├── geo_lookup.cc
│ │ ├── geo_lookup.h
│ │ ├── https_client.cc
│ │ ├── https_client.h
│ │ ├── ip_tree.cc
│ │ ├── ip_tree.h
│ │ ├── md5.h
│ │ ├── msc_tree.cc
│ │ ├── msc_tree.h
│ │ ├── phase.h
│ │ ├── random.cc
│ │ ├── random.h
│ │ ├── regex.cc
│ │ ├── regex.h
│ │ ├── sha1.h
│ │ ├── shared_files.cc
│ │ ├── shared_files.h
│ │ ├── string.h
│ │ ├── system.cc
│ │ └── system.h
│ └── variables/
│ ├── args.h
│ ├── args_combined_size.h
│ ├── args_get.h
│ ├── args_get_names.h
│ ├── args_names.h
│ ├── args_post.h
│ ├── args_post_names.h
│ ├── auth_type.h
│ ├── duration.cc
│ ├── duration.h
│ ├── env.cc
│ ├── env.h
│ ├── files.h
│ ├── files_combined_size.h
│ ├── files_names.h
│ ├── files_sizes.h
│ ├── files_tmp_content.h
│ ├── files_tmp_names.h
│ ├── full_request.h
│ ├── full_request_length.h
│ ├── geo.h
│ ├── global.h
│ ├── highest_severity.cc
│ ├── highest_severity.h
│ ├── inbound_data_error.h
│ ├── ip.h
│ ├── matched_var.h
│ ├── matched_var_name.h
│ ├── matched_vars.h
│ ├── matched_vars_names.h
│ ├── modsec_build.cc
│ ├── modsec_build.h
│ ├── msc_pcre_error.h
│ ├── msc_pcre_limits_exceeded.h
│ ├── multipart_boundary_quoted.h
│ ├── multipart_boundary_whitespace.h
│ ├── multipart_crlf_lf_lines.h
│ ├── multipart_data_after.h
│ ├── multipart_data_before.h
│ ├── multipart_file_limit_exceeded.h
│ ├── multipart_file_name.h
│ ├── multipart_header_folding.h
│ ├── multipart_invalid_header_folding.h
│ ├── multipart_invalid_part.h
│ ├── multipart_invalid_quoting.h
│ ├── multipart_lf_line.h
│ ├── multipart_missing_semicolon.h
│ ├── multipart_name.h
│ ├── multipart_part_headers.h
│ ├── multipart_strict_error.h
│ ├── multipart_unmatched_boundary.h
│ ├── outbound_data_error.h
│ ├── path_info.h
│ ├── query_string.h
│ ├── remote_addr.h
│ ├── remote_host.h
│ ├── remote_port.h
│ ├── remote_user.cc
│ ├── remote_user.h
│ ├── reqbody_error.h
│ ├── reqbody_error_msg.h
│ ├── reqbody_processor.h
│ ├── reqbody_processor_error.h
│ ├── reqbody_processor_error_msg.h
│ ├── request_base_name.h
│ ├── request_body.h
│ ├── request_body_length.h
│ ├── request_cookies.h
│ ├── request_cookies_names.h
│ ├── request_file_name.h
│ ├── request_headers.h
│ ├── request_headers_names.h
│ ├── request_line.h
│ ├── request_method.h
│ ├── request_protocol.h
│ ├── request_uri.h
│ ├── request_uri_raw.h
│ ├── resource.h
│ ├── response_body.h
│ ├── response_content_length.h
│ ├── response_content_type.h
│ ├── response_headers.h
│ ├── response_headers_names.h
│ ├── response_protocol.h
│ ├── response_status.h
│ ├── rule.cc
│ ├── rule.h
│ ├── server_addr.h
│ ├── server_name.h
│ ├── server_port.h
│ ├── session.h
│ ├── session_id.h
│ ├── status.h
│ ├── time.cc
│ ├── time.h
│ ├── time_day.cc
│ ├── time_day.h
│ ├── time_epoch.cc
│ ├── time_epoch.h
│ ├── time_hour.cc
│ ├── time_hour.h
│ ├── time_min.cc
│ ├── time_min.h
│ ├── time_mon.cc
│ ├── time_mon.h
│ ├── time_sec.cc
│ ├── time_sec.h
│ ├── time_wday.cc
│ ├── time_wday.h
│ ├── time_year.cc
│ ├── time_year.h
│ ├── tx.cc
│ ├── tx.h
│ ├── unique_id.h
│ ├── url_encoded_error.h
│ ├── user.h
│ ├── user_id.h
│ ├── variable.cc
│ ├── variable.h
│ ├── web_app_id.h
│ ├── xml.cc
│ └── xml.h
├── test/
│ ├── .empty
│ ├── Makefile.am
│ ├── benchmark/
│ │ ├── Makefile.am
│ │ ├── basic_rules.conf
│ │ ├── benchmark.cc
│ │ ├── download-owasp-v3-rules.sh
│ │ └── download-owasp-v4-rules.sh
│ ├── coding_style_suppressions.txt
│ ├── common/
│ │ ├── colors.h
│ │ ├── custom_debug_log.cc
│ │ ├── custom_debug_log.h
│ │ ├── modsecurity_test.cc
│ │ ├── modsecurity_test.h
│ │ ├── modsecurity_test_context.h
│ │ └── modsecurity_test_results.h
│ ├── cppcheck_suppressions.txt
│ ├── custom-test-driver
│ ├── fuzzer/
│ │ ├── Makefile.am
│ │ └── afl_fuzzer.cc
│ ├── modsecurity-regression-ip-list.txt
│ ├── modsecurity-regression-rules.txt
│ ├── optimization/
│ │ └── optimization.cc
│ ├── regression/
│ │ ├── regression.cc
│ │ ├── regression_test.cc
│ │ └── regression_test.h
│ ├── regression-tests-valgrind.sh
│ ├── test-cases/
│ │ ├── data/
│ │ │ ├── GeoIP2-City-Test-source.json
│ │ │ ├── GeoIP2-City-Test.mmdb
│ │ │ ├── SoapEnvelope-bad.dtd
│ │ │ ├── SoapEnvelope-bad.xsd
│ │ │ ├── SoapEnvelope.dtd
│ │ │ ├── SoapEnvelope.xsd
│ │ │ ├── SoapEnvelope2.xsd
│ │ │ ├── big-file.conf
│ │ │ ├── config_example-bad-op-include.txt
│ │ │ ├── config_example-ops-include.txt
│ │ │ ├── config_example.txt
│ │ │ ├── config_example2.txt
│ │ │ ├── config_example3.txt
│ │ │ ├── geo/
│ │ │ │ └── README.txt
│ │ │ ├── inspectFile-abcdef.lua
│ │ │ ├── ipMatchFromFile.txt
│ │ │ ├── match-getvar-multi-transformations.lua
│ │ │ ├── match-getvar-transformation.lua
│ │ │ ├── match-getvar-withTnfs.lua
│ │ │ ├── match-getvar.lua
│ │ │ ├── match-getvars-args.lua
│ │ │ ├── match-getvars.lua
│ │ │ ├── match-log.lua
│ │ │ ├── match-set.lua
│ │ │ ├── match.lua
│ │ │ ├── not-so-big-file.conf
│ │ │ ├── pattern-file1.data
│ │ │ ├── pattern-file2.data
│ │ │ ├── script.lua
│ │ │ ├── setvar.lua
│ │ │ ├── ssdeep.txt
│ │ │ ├── test.lua
│ │ │ └── unicode.mapping-reduced
│ │ └── regression/
│ │ ├── action-allow.json
│ │ ├── action-block.json
│ │ ├── action-ctl_audit_engine.json
│ │ ├── action-ctl_request_body_access.json
│ │ ├── action-ctl_request_body_processor.json
│ │ ├── action-ctl_request_body_processor_urlencoded.json
│ │ ├── action-ctl_rule_engine.json
│ │ ├── action-ctl_rule_remove_by_id.json
│ │ ├── action-ctl_rule_remove_by_tag.json
│ │ ├── action-ctl_rule_remove_target_by_id.json
│ │ ├── action-ctl_rule_remove_target_by_tag.json
│ │ ├── action-disruptive.json
│ │ ├── action-exec.json
│ │ ├── action-expirevar.json
│ │ ├── action-id.json
│ │ ├── action-initcol.json
│ │ ├── action-msg.json
│ │ ├── action-setenv.json
│ │ ├── action-setrsc.json
│ │ ├── action-setsid.json
│ │ ├── action-setuid.json
│ │ ├── action-skip.json
│ │ ├── action-tag.json
│ │ ├── action-tnf-base64.json
│ │ ├── action-xmlns.json
│ │ ├── actions.json
│ │ ├── auditlog.json
│ │ ├── collection-case-insensitive.json
│ │ ├── collection-lua.json
│ │ ├── collection-regular_expression_selection.json
│ │ ├── collection-resource.json
│ │ ├── collection-tx-with-macro.json
│ │ ├── collection-tx.json
│ │ ├── config-body_limits.json
│ │ ├── config-calling_phases_by_name.json
│ │ ├── config-include-bad.json
│ │ ├── config-include.json
│ │ ├── config-remove_by_id.json
│ │ ├── config-remove_by_msg.json
│ │ ├── config-remove_by_tag.json
│ │ ├── config-response_type.json
│ │ ├── config-secdefaultaction.json
│ │ ├── config-secremoterules.json
│ │ ├── config-update-action-by-id.json
│ │ ├── config-update-target-by-id.json
│ │ ├── config-update-target-by-msg.json
│ │ ├── config-update-target-by-tag.json
│ │ ├── config-xml_external_entity.json
│ │ ├── debug_log.json
│ │ ├── directive-sec_rule_script.json
│ │ ├── fn-setHostname.json
│ │ ├── issue-1152.json
│ │ ├── issue-1528.json
│ │ ├── issue-1565.json
│ │ ├── issue-1576.json
│ │ ├── issue-1591.json
│ │ ├── issue-1725.json
│ │ ├── issue-1743.json
│ │ ├── issue-1785.json
│ │ ├── issue-1812.json
│ │ ├── issue-1825.json
│ │ ├── issue-1831.json
│ │ ├── issue-1844.json
│ │ ├── issue-1850.json
│ │ ├── issue-1941.json
│ │ ├── issue-1943.json
│ │ ├── issue-1956.json
│ │ ├── issue-1960.json
│ │ ├── issue-2000.json
│ │ ├── issue-2099.json
│ │ ├── issue-2111.json
│ │ ├── issue-2196.json
│ │ ├── issue-2296.json
│ │ ├── issue-2423-msg-in-chain.json
│ │ ├── issue-2427.json
│ │ ├── issue-3340.json
│ │ ├── issue-394.json
│ │ ├── issue-849.json
│ │ ├── issue-960.json
│ │ ├── misc-variable-under-quotes.json
│ │ ├── misc.json
│ │ ├── offset-variable.json
│ │ ├── operator-UnconditionalMatch.json
│ │ ├── operator-detectsqli.json
│ │ ├── operator-detectxss.json
│ │ ├── operator-fuzzyhash.json
│ │ ├── operator-inpectFile.json
│ │ ├── operator-ipMatchFromFile.json
│ │ ├── operator-pm.json
│ │ ├── operator-pmfromfile.json
│ │ ├── operator-rx.json
│ │ ├── operator-rxGlobal.json
│ │ ├── operator-validate-byte-range.json
│ │ ├── operator-verifycc.json
│ │ ├── operator-verifycpf.json
│ │ ├── operator-verifyssn.json
│ │ ├── operator-verifysvnr.json
│ │ ├── request-body-parser-json.json
│ │ ├── request-body-parser-multipart-crlf.json
│ │ ├── request-body-parser-multipart.json
│ │ ├── request-body-parser-xml-validade-dtd.json
│ │ ├── request-body-parser-xml.json
│ │ ├── rule-920120.json
│ │ ├── rule-920200.json
│ │ ├── rule-920274.json
│ │ ├── sec_component_signature.json
│ │ ├── secaction.json
│ │ ├── secargumentslimit.json
│ │ ├── secmarker.json
│ │ ├── secruleengine.json
│ │ ├── transformation-none.json
│ │ ├── transformations.json
│ │ ├── variable-ARGS.json
│ │ ├── variable-ARGS_COMBINED_SIZE.json
│ │ ├── variable-ARGS_GET.json
│ │ ├── variable-ARGS_GET_NAMES.json
│ │ ├── variable-ARGS_NAMES.json
│ │ ├── variable-ARGS_POST.json
│ │ ├── variable-ARGS_POST_NAMES.json
│ │ ├── variable-AUTH_TYPE.json
│ │ ├── variable-DURATION.json
│ │ ├── variable-ENV.json
│ │ ├── variable-FILES.json
│ │ ├── variable-FILES_COMBINED_SIZE.json
│ │ ├── variable-FILES_NAMES.json
│ │ ├── variable-FILES_SIZES.json
│ │ ├── variable-FULL_REQUEST.json
│ │ ├── variable-FULL_REQUEST_LENGTH.json
│ │ ├── variable-GEO.json
│ │ ├── variable-HIGHEST_SEVERITY.json
│ │ ├── variable-INBOUND_DATA_ERROR.json
│ │ ├── variable-MATCHED_VAR.json
│ │ ├── variable-MATCHED_VARS.json
│ │ ├── variable-MATCHED_VARS_NAMES.json
│ │ ├── variable-MATCHED_VAR_NAME.json
│ │ ├── variable-MODSEC_BUILD.json
│ │ ├── variable-MULTIPART_CRLF_LF_LINES.json
│ │ ├── variable-MULTIPART_FILENAME.json
│ │ ├── variable-MULTIPART_INVALID_HEADER_FOLDING.json
│ │ ├── variable-MULTIPART_NAME.json
│ │ ├── variable-MULTIPART_PART_HEADERS.json
│ │ ├── variable-MULTIPART_STRICT_ERROR.json
│ │ ├── variable-MULTIPART_UNMATCHED_BOUNDARY.json
│ │ ├── variable-OUTBOUND_DATA_ERROR.json
│ │ ├── variable-PATH_INFO.json
│ │ ├── variable-QUERY_STRING.json
│ │ ├── variable-REMOTE_ADDR.json
│ │ ├── variable-REMOTE_HOST.json
│ │ ├── variable-REMOTE_PORT.json
│ │ ├── variable-REMOTE_USER.json
│ │ ├── variable-REQBODY_PROCESSOR.json
│ │ ├── variable-REQBODY_PROCESSOR_ERROR.json
│ │ ├── variable-REQUEST_BASENAME.json
│ │ ├── variable-REQUEST_BODY.json
│ │ ├── variable-REQUEST_BODY_LENGTH.json
│ │ ├── variable-REQUEST_COOKIES.json
│ │ ├── variable-REQUEST_COOKIES_NAMES.json
│ │ ├── variable-REQUEST_FILENAME.json
│ │ ├── variable-REQUEST_HEADERS.json
│ │ ├── variable-REQUEST_HEADERS_NAMES.json
│ │ ├── variable-REQUEST_LINE.json
│ │ ├── variable-REQUEST_METHOD.json
│ │ ├── variable-REQUEST_PROTOCOL.json
│ │ ├── variable-REQUEST_URI.json
│ │ ├── variable-REQUEST_URI_RAW.json
│ │ ├── variable-RESPONSE_BODY.json
│ │ ├── variable-RESPONSE_CONTENT_LENGTH.json
│ │ ├── variable-RESPONSE_CONTENT_TYPE.json
│ │ ├── variable-RESPONSE_HEADERS.json
│ │ ├── variable-RESPONSE_HEADERS_NAMES.json
│ │ ├── variable-RESPONSE_PROTOCOL.json
│ │ ├── variable-RULE.json
│ │ ├── variable-SERVER_ADDR.json
│ │ ├── variable-SERVER_NAME.json
│ │ ├── variable-SERVER_PORT.json
│ │ ├── variable-SESSIONID.json
│ │ ├── variable-STATUS.json
│ │ ├── variable-TIME.json
│ │ ├── variable-TIME_DAY.json
│ │ ├── variable-TIME_EPOCH.json
│ │ ├── variable-TIME_HOUR.json
│ │ ├── variable-TIME_MIN.json
│ │ ├── variable-TIME_MON.json
│ │ ├── variable-TIME_SEC.json
│ │ ├── variable-TIME_WDAY.json
│ │ ├── variable-TIME_YEAR.json
│ │ ├── variable-TX.json
│ │ ├── variable-UNIQUE_ID.json
│ │ ├── variable-URLENCODED_ERROR.json
│ │ ├── variable-USERID.json
│ │ ├── variable-WEBAPPID.json
│ │ ├── variable-WEBSERVER_ERROR_LOG.json
│ │ ├── variable-XML.json
│ │ ├── variable-variation-count.json
│ │ └── variable-variation-exclusion.json
│ ├── test-suite.in
│ ├── test-suite.sh
│ ├── unit/
│ │ ├── unit.cc
│ │ ├── unit_test.cc
│ │ └── unit_test.h
│ ├── unit-tests-valgrind.sh
│ └── valgrind_suppressions.txt
├── tools/
│ ├── Makefile.am
│ └── rules-check/
│ ├── Makefile.am
│ └── rules-check.cc
├── unicode.mapping
└── vcbuild.bat
================================================
FILE CONTENTS
================================================
================================================
FILE: .editorconfig
================================================
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
indent_style = space
# Scripts without suffixes in the project root tend to indent by two spaces
indent_size = 2
# Most of the project files indent by four spaces
[*/**]
indent_size = 4
# Test files indent by two spaces
[test/**]
indent_size = 2
# The config parser file indents by both two and four spaces,
# so we choose to indent by two spaces as a common denominator.
[*.yy]
indent_size = 2
[{Makefile,Makefile.am}]
indent_style = tab
================================================
FILE: .github/ISSUE_TEMPLATE/bug-report-for-version-2-x.md
================================================
---
name: Bug report for version 2.x
about: Create a report to help us improve
title: ''
labels: '2.x'
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**Logs and dumps**
Output of:
1. DebugLogs (level 9)
2. AuditLogs
3. Error logs
4. If there is a crash, the core dump file.
_Notice:_ Be carefully to not leak any confidential information.
**To Reproduce**
Steps to reproduce the behavior:
A **curl** command line that mimics the original request and reproduces the problem. Or a ModSecurity v3 test case.
[e.g: curl "modsec-full/ca/..\\..\\..\\..\\..\\..\\/\\etc/\\passwd" or [issue-394.json](https://github.com/SpiderLabs/ModSecurity/blob/v3/master/test/test-cases/regression/issue-394.json)]
**Expected behavior**
A clear and concise description of what you expected to happen.
**Server (please complete the following information):**
- ModSecurity version (and connector): [e.g. ModSecurity v3.0.1 with nginx-connector v1.0.0]
- WebServer: [e.g. nginx-1.15.5]
- OS (and distro): [e.g. Linux, archlinux]
**Rule Set (please complete the following information):**
- Running any public or commercial rule set? [e.g. SpiderLabs commercial rules]
- What is the version number? [e.g. 2018-08-11]
**Additional context**
Add any other context about the problem here.
================================================
FILE: .github/ISSUE_TEMPLATE/bug-report-for-version-3-x.md
================================================
---
name: Bug report for version 3.x
about: Create a report to help us improve. If you don't know a specific detail or
piece of information leave it blank, if necessary we will help you to figure out.
title: ''
labels: '3.x'
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**Logs and dumps**
Output of:
1. DebugLogs (level 9)
2. AuditLogs
3. Error logs
4. If there is a crash, the core dump file.
_Notice:_ Be careful to not leak any confidential information.
**To Reproduce**
Steps to reproduce the behavior:
A **curl** command line that mimics the original request and reproduces the problem. Or a ModSecurity v3 test case.
[e.g: curl "modsec-full/ca/..\\..\\..\\..\\..\\..\\/\\etc/\\passwd" or [issue-394.json](https://github.com/SpiderLabs/ModSecurity/blob/v3/master/test/test-cases/regression/issue-394.json)]
**Expected behavior**
A clear and concise description of what you expected to happen.
**Server (please complete the following information):**
- ModSecurity version (and connector): [e.g. ModSecurity v3.0.8 with nginx-connector v1.0.3]
- WebServer: [e.g. nginx-1.18.0]
- OS (and distro): [e.g. Linux, archlinux]
**Rule Set (please complete the following information):**
- Running any public or commercial rule set? [e.g. SpiderLabs commercial rules]
- What is the version number? [e.g. 2018-08-11]
**Additional context**
Add any other context about the problem here.
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
<!-- Thank you for contributing to OWASP ModSecurity, your effort is greatly appreciated -->
<!-- Please help us by adding the information below in this PR so it aids reviewers -->
## what
<!--
- Describe high-level what changed as a result of these commits (i.e. in plain-english, what do these changes mean?)
- Use bullet points to be concise and to the point.
-->
## why
<!--
- Provide the justifications for the changes (e.g. business case).
- Describe why these changes were made (e.g. why do these commits fix the problem?)
- Use bullet points to be concise and to the point.
-->
## references
<!--
- Link to any supporting github issues or helpful documentation to add some context (e.g. stackoverflow).
- Use `closes #123`, if this PR closes a GitHub issue `#123`
-->
================================================
FILE: .github/workflows/ci.yml
================================================
name: Quality Assurance
on:
push:
pull_request:
jobs:
build-linux:
name: Linux (${{ matrix.platform.label }}, ${{ matrix.compiler.label }}, ${{ matrix.configure.label }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
platform:
- {label: "x64", arch: "amd64", configure: ""}
- {label: "x32", arch: "i386", configure: "PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32"}
compiler:
- {label: "gcc", cc: "gcc", cxx: "g++"}
- {label: "clang", cc: "clang", cxx: "clang++"}
configure:
- {label: "with parser generation", opt: "--enable-parser-generation" }
- {label: "wo curl", opt: "--without-curl" }
- {label: "wo lua", opt: "--without-lua" }
- {label: "wo maxmind", opt: "--without-maxmind" }
- {label: "wo libxml", opt: "--without-libxml" }
- {label: "wo geoip", opt: "--without-geoip" }
- {label: "wo ssdeep", opt: "--without-ssdeep" }
- {label: "with lmdb", opt: "--with-lmdb" }
- {label: "with pcre", opt: "--with-pcre" }
exclude:
- platform: {label: "x32"}
configure: {label: "wo geoip"}
- platform: {label: "x32"}
configure: {label: "wo ssdeep"}
steps:
- name: Setup Dependencies (common)
run: |
sudo dpkg --add-architecture ${{ matrix.platform.arch }}
sudo apt-get update -y -qq
sudo apt-get install -y libyajl-dev:${{ matrix.platform.arch }} \
libcurl4-openssl-dev:${{ matrix.platform.arch }} \
liblmdb-dev:${{ matrix.platform.arch }} \
liblua5.2-dev:${{ matrix.platform.arch }} \
libmaxminddb-dev:${{ matrix.platform.arch }} \
libpcre2-dev:${{ matrix.platform.arch }} \
pcre2-utils:${{ matrix.platform.arch }} \
bison flex
- name: Setup Dependencies (x32)
if: ${{ matrix.platform.label == 'x32' }}
run: |
sudo apt-get install g++-multilib
sudo apt-get install -y libxml2-dev:${{ matrix.platform.arch }} \
libpcre3-dev:${{ matrix.platform.arch }}
- name: Setup Dependencies (x64)
if: ${{ matrix.platform.label == 'x64' }}
run: |
sudo apt-get install -y libgeoip-dev:${{ matrix.platform.arch }} \
libfuzzy-dev:${{ matrix.platform.arch }}
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: build.sh
run: ./build.sh
- name: configure
env:
CC: ${{ matrix.compiler.cc }}
CXX: ${{ matrix.compiler.cxx }}
run: ./configure ${{ matrix.platform.configure }} ${{ matrix.configure.opt }} --enable-assertions=yes
- uses: ammaraskar/gcc-problem-matcher@master
- name: make
run: make -j `nproc`
- name: check
run: make check
build-macos:
name: macOS (${{ matrix.configure.label }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-14]
configure:
- {label: "with parser generation", opt: "--enable-parser-generation" }
- {label: "wo curl", opt: "--without-curl" }
- {label: "wo lua", opt: "--without-lua" }
- {label: "wo maxmind", opt: "--without-maxmind" }
- {label: "wo libxml", opt: "--without-libxml" }
- {label: "wo geoip", opt: "--without-geoip" }
- {label: "wo ssdeep", opt: "--without-ssdeep" }
- {label: "with lmdb", opt: "--with-lmdb" }
- {label: "with pcre", opt: "--with-pcre" }
steps:
- name: Setup Dependencies
# curl, pcre2 not installed because they're already
# included in the image
run: |
brew install autoconf \
automake \
libtool \
yajl \
lmdb \
lua \
libmaxminddb \
libxml2 \
ssdeep \
pcre \
bison \
flex
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Build GeoIP
run: |
git clone --depth 1 --no-checkout https://github.com/maxmind/geoip-api-c.git
cd geoip-api-c
git fetch --tags
# Check out the last release, v1.6.12
git checkout 4b526e7331ca1d692b74a0509ddcc725622ed31a
autoreconf --install
./configure --disable-dependency-tracking --disable-silent-rules --prefix=/opt/homebrew
make install
- name: build.sh
run: ./build.sh
- name: configure
run: ./configure ${{ matrix.configure.opt }} --enable-assertions=yes
- uses: ammaraskar/gcc-problem-matcher@master
- name: make
run: make -j `sysctl -n hw.logicalcpu`
- name: check
run: make check
build-windows:
name: Windows (${{ matrix.platform.label }}, ${{ matrix.configure.label }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2022]
platform:
- {label: "x64", arch: "x86_64"}
configuration: [Release]
configure:
- {label: "full", opt: "" }
- {label: "wo curl", opt: "-DWITH_CURL=OFF" }
- {label: "wo lua", opt: "-DWITH_LUA=OFF" }
- {label: "wo maxmind", opt: "-DWITH_MAXMIND=OFF" }
- {label: "wo libxml", opt: "-DWITH_LIBXML2=OFF" }
- {label: "with lmdb", opt: "-DWITH_LMDB=ON" }
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Install Conan
run: |
pip3 install conan --upgrade
conan profile detect
- uses: ammaraskar/msvc-problem-matcher@master
- name: Build ${{ matrix.configuration }} ${{ matrix.platform.arch }} ${{ matrix.configure.label }}
shell: cmd
run: vcbuild.bat ${{ matrix.configuration }} ${{ matrix.platform.arch }} NO_ASAN "${{ matrix.configure.opt }}"
- name: Set up test environment
working-directory: build\win32\build\${{ matrix.configuration }}
env:
BASE_DIR: ..\..\..\..
shell: cmd
run: |
copy unit_tests.exe %BASE_DIR%\test
copy regression_tests.exe %BASE_DIR%\test
copy libModSecurity.dll %BASE_DIR%\test
copy %BASE_DIR%\unicode.mapping %BASE_DIR%\test
md \tmp
md \bin
copy "C:\Program Files\Git\usr\bin\echo.exe" \bin
copy "C:\Program Files\Git\usr\bin\echo.exe" \bin\echo
- name: Disable tests that don't work on Windows
working-directory: test\test-cases\regression
shell: cmd
run: |
jq "map(if .title == \"Test match variable (1/n)\" then .enabled = 0 else . end)" issue-2423-msg-in-chain.json > tmp.json && move /Y tmp.json issue-2423-msg-in-chain.json
jq "map(if .title == \"Test match variable (2/n)\" then .enabled = 0 else . end)" issue-2423-msg-in-chain.json > tmp.json && move /Y tmp.json issue-2423-msg-in-chain.json
jq "map(if .title == \"Test match variable (3/n)\" then .enabled = 0 else . end)" issue-2423-msg-in-chain.json > tmp.json && move /Y tmp.json issue-2423-msg-in-chain.json
jq "map(if .title == \"Variable offset - FILES_NAMES\" then .enabled = 0 else . end)" offset-variable.json > tmp.json && move /Y tmp.json offset-variable.json
- name: Run tests
working-directory: build\win32\build
run: |
ctest -C ${{ matrix.configuration }} --output-on-failure
cppcheck:
runs-on: [macos-14]
steps:
- name: Setup Dependencies
run: |
brew install autoconf \
automake \
libtool \
cppcheck
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: configure
run: |
./build.sh
./configure
- name: cppcheck
run: make check-static
================================================
FILE: .github/workflows/ci_new.yml
================================================
name: Quality Assurance new
on:
push:
pull_request:
jobs:
build-linux:
name: Linux (${{ matrix.platform.label }}, ${{ matrix.compiler.label }}, ${{ matrix.configure.label }})
# Ubuntu 24.04 does not provide native 32-bit (i386) installation images.
# Only amd64 (x86_64) is officially supported. 32-bit has been removed from this matrix.
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
platform:
- { label: "x64", arch: "amd64", configure: "" }
compiler:
- { label: "gcc", cc: "gcc", cxx: "g++" }
- { label: "clang", cc: "clang", cxx: "clang++" }
configure:
- { label: "with parser generation", opt: "--enable-parser-generation" }
- { label: "without curl", opt: "--without-curl" }
- { label: "without lua", opt: "--without-lua" }
- { label: "without maxmind", opt: "--without-maxmind" }
- { label: "without libxml", opt: "--without-libxml" }
- { label: "without geoip", opt: "--without-geoip" }
- { label: "without ssdeep", opt: "--without-ssdeep" }
- { label: "with lmdb", opt: "--with-lmdb" }
- { label: "with pcre2 (default)", opt: "" }
- { label: "with pcre", opt: "--with-pcre" }
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update -y -qq
sudo apt-get install -y \
libyajl-dev \
libcurl4-openssl-dev \
liblmdb-dev \
liblua5.2-dev \
libmaxminddb-dev \
libpcre2-dev \
libxml2-dev \
libfuzzy-dev \
pcre2-utils \
libpcre3-dev \
bison \
flex \
pkg-config
- name: Run build preparation script
run: ./build.sh
- name: Configure
env:
CC: ${{ matrix.compiler.cc }}
CXX: ${{ matrix.compiler.cxx }}
run: ./configure ${{ matrix.platform.configure }} ${{ matrix.configure.opt }} --enable-assertions=yes
- uses: ammaraskar/gcc-problem-matcher@master
- name: Compile
run: make -j "$(nproc)"
- name: Run tests
run: make check
build-macos:
name: macOS (${{ matrix.configure.label }})
runs-on: macos-15
strategy:
fail-fast: false
matrix:
configure:
- { label: "with parser generation", opt: "--enable-parser-generation" }
- { label: "without curl", opt: "--without-curl" }
- { label: "without lua", opt: "--without-lua" }
- { label: "without maxmind", opt: "--without-maxmind" }
- { label: "without libxml", opt: "--without-libxml" }
- { label: "without geoip", opt: "--without-geoip" }
- { label: "without ssdeep", opt: "--without-ssdeep" }
- { label: "with lmdb", opt: "--with-lmdb" }
- { label: "with pcre2 (default)", opt: "" }
- { label: "with pcre", opt: "--with-pcre" }
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: recursive
- name: Install dependencies
# curl and pcre2 are typically already available in the macOS runner image
run: |
brew install autoconf \
automake \
libtool \
yajl \
lmdb \
lua \
libmaxminddb \
libxml2 \
ssdeep \
pcre \
bison \
flex
- name: Run build preparation script
run: ./build.sh
- name: Configure
run: ./configure ${{ matrix.configure.opt }} --enable-assertions=yes
- uses: ammaraskar/gcc-problem-matcher@master
- name: Compile
run: make -j "$(sysctl -n hw.logicalcpu)"
- name: Run tests
run: make check
build-windows:
name: Windows (${{ matrix.platform.label }}, ${{ matrix.configure.label }})
runs-on: windows-2025
strategy:
fail-fast: false
matrix:
platform:
- { label: "x64", arch: "x86_64" }
configuration: [Release]
configure:
- { label: "full", opt: "" }
- { label: "without curl", opt: "-DWITH_CURL=OFF" }
- { label: "without lua", opt: "-DWITH_LUA=OFF" }
- { label: "without maxmind", opt: "-DWITH_MAXMIND=OFF" }
- { label: "without libxml", opt: "-DWITH_LIBXML2=OFF" }
- { label: "with lmdb", opt: "-DWITH_LMDB=ON" }
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: recursive
- name: Install Conan package manager
run: |
pip3 install conan --upgrade
conan profile detect
- uses: ammaraskar/msvc-problem-matcher@master
- name: Build project
shell: cmd
run: vcbuild.bat ${{ matrix.configuration }} ${{ matrix.platform.arch }} NO_ASAN "${{ matrix.configure.opt }}"
- name: Prepare test environment
working-directory: build\win32\build\${{ matrix.configuration }}
env:
BASE_DIR: ..\..\..\..
shell: cmd
run: |
copy unit_tests.exe %BASE_DIR%\test
copy regression_tests.exe %BASE_DIR%\test
copy libModSecurity.dll %BASE_DIR%\test
copy %BASE_DIR%\unicode.mapping %BASE_DIR%\test
md \tmp
md \bin
copy "C:\Program Files\Git\usr\bin\echo.exe" \bin
copy "C:\Program Files\Git\usr\bin\echo.exe" \bin\echo
- name: Disable unsupported tests on Windows
working-directory: test\test-cases\regression
shell: cmd
run: |
jq "map(if .title == \"Test match variable (1/n)\" then .enabled = 0 else . end)" issue-2423-msg-in-chain.json > tmp.json && move /Y tmp.json issue-2423-msg-in-chain.json
jq "map(if .title == \"Test match variable (2/n)\" then .enabled = 0 else . end)" issue-2423-msg-in-chain.json > tmp.json && move /Y tmp.json issue-2423-msg-in-chain.json
jq "map(if .title == \"Test match variable (3/n)\" then .enabled = 0 else . end)" issue-2423-msg-in-chain.json > tmp.json && move /Y tmp.json issue-2423-msg-in-chain.json
jq "map(if .title == \"Variable offset - FILES_NAMES\" then .enabled = 0 else . end)" offset-variable.json > tmp.json && move /Y tmp.json offset-variable.json
- name: Run tests
working-directory: build\win32\build
run: ctest -C ${{ matrix.configuration }} --output-on-failure
cppcheck:
name: Static analysis (cppcheck)
runs-on: macos-15
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: recursive
- name: Install cppcheck
run: |
brew install autoconf automake libtool cppcheck libmaxminddb yajl lua lmdb ssdeep
- name: Configure project
run: |
./build.sh
./configure
- name: Run cppcheck
run: make check-static
cppcheck-linux:
name: Static analysis (cppcheck, Linux, debian:sid)
runs-on: ubuntu-latest
container: debian:sid
steps:
- name: Install basic tools
run: |
apt-get update
apt-get install -y git
- name: Mark repo as safe for git
run: git config --global --add safe.directory $GITHUB_WORKSPACE
- uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: recursive
- name: Install dependencies (v2 style)
run: |
apt-get update
apt-get install -y \
autoconf \
automake \
build-essential \
libtool \
pkg-config \
cppcheck \
libyajl-dev \
libcurl4-openssl-dev \
liblmdb-dev \
liblua5.2-dev \
libmaxminddb-dev \
libpcre2-dev \
libxml2-dev \
libfuzzy-dev \
pcre2-utils \
bison \
flex
- name: Run build preparation script
run: ./build.sh
- name: Configure project
run: ./configure
- name: Run cppcheck
run: make check-static
================================================
FILE: .gitignore
================================================
*.o
*.lo
*.la
**/Makefile
**/Makefile.in
aclocal.m4
ar-lib
autom4te.cache/
build/libtool.m4
build/ltoptions.m4
build/ltsugar.m4
build/ltversion.m4
build/lt~obsolete.m4
build/win32/build
build/win32/CMakeUserPresets.json
compile
config.guess
config.log
config.status
config.sub
config.h.in~
configure
configure~
depcomp
modsecurity.pc
.deps
.libs
.dirstamp
src/config.h
src/config.h.in
src/location.hh
src/position.hh
src/stack.hh
src/stamp-h1
src/headers.mk
/test/rules_optimization
/test/regression_tests
/test/unit_tests
/test-driver
/test/massif.out.*
/test/benchmark/benchmark
/test/benchmark/owasp-v3/
/test/test-cases/regression/*.trs
/test/test-cases/regression/*.log
/test-suite.log
ylwrap
missing
install-sh
libtool
ltmain.sh
examples/simple_example_using_c/test
/tools/rules-check/modsec-rules-check
examples/multiprocess_c/multi
examples/multithread/multithread
examples/reading_logs_via_rule_message/simple_request
examples/reading_logs_with_offset/read
examples/using_bodies_in_chunks/simple_request
================================================
FILE: .gitmodules
================================================
[submodule "test/test-cases/secrules-language-tests"]
path = test/test-cases/secrules-language-tests
url = https://github.com/owasp-modsecurity/secrules-language-tests
[submodule "others/libinjection"]
path = others/libinjection
url = https://github.com/libinjection/libinjection.git
[submodule "bindings/python"]
path = bindings/python
url = https://github.com/owasp-modsecurity/ModSecurity-Python-bindings.git
[submodule "others/mbedtls"]
path = others/mbedtls
url = https://github.com/Mbed-TLS/mbedtls.git
================================================
FILE: AUTHORS
================================================
zimmerle = Felipe Zimmerle <felipe@zimmerle.org>
rbarnett = Ryan C. Barnett <rcbarnett@gmail.com>
csanders-git = Chaim Sanders <chaim@chaimsanders.com>
victorhora = Victor Hora <victorminuto@gmail.com>
================================================
FILE: CHANGES
================================================
v3.0.14 - 2025-Feb-25
---------------------
- [fix: fixed htmlEntityDecode methods]
[PR from private repo - @theseion,@airween; fixed CVE-2025-27110]
- fix: Added missing header to avoid build error with gcc-15
[PR #3342 - @airween]
- Fix for issue #3334: build not finding YAJL
[PR #3335 - @RooHTaylor]
- fix: add value checking to @validateByteRange
[PR #3322 - @airween]
- fix: build library on OSX without GeoIP brew package
[PR #3319 - @theseion,@airween]
- Update README.md
[PR #3314 - @ElevationsRPG]
- Fix: Add false positive cppcheck-suppress for compatibility with upda…
[PR #3307 - @gberkes]
- fix: align TIME_MON variable's behavior
[PR #3306 - @M4tteoP,@theseion,@airween]
- Fix m_requestHostName variable behavior
[PR #3298 - @airween]
- Add regression rules for test
[PR #3291 - @hnakamur]
- Fix modsecurity-regression-test-secremoterules.txt URL in example
[PR #3287 - @hnakamur]
- Use latest version of cppcheck (2.15.0) to analyze codebase
[PR #3283 - @eduar-hte]
- Replace usage of range-checked 'at' method when vector/string has already been size checked
[PR #3280 - @eduar-hte]
- chore: add 'log' action to rule 200005
[PR #3266 - @airween]
- docs: add a logo picture for github dark theme
[PR #3264 - @xuruidong]
- Leverage std::make_unique & std::make_shared to create objects in the heap
[PR #3254 - @eduar-hte]
- Simplified handling of RuleMessage by removing usage of std::shared_ptr
[PR #3253 - @eduar-hte]
- Simplified constructors, copy constructors & assignment operators
[PR #3248 - @eduar-hte]
v3.0.13 - 2024-Sep-03
---------------------
- Adjust reference to modsecurity::utils::string::VALID_HEX
[PR #3243 - @eduar-hte]
- Lua::run: Move logging of str parameter to higher log level.
[PR #3240 - @frozenice]
- Remove unnecessary heap allocated copies in Transformation actions
[PR #3231 - @eduar-hte]
- Removed multiple heap-allocated copies in Pm::init & parse_pm_content
[PR #3233 - @eduar-hte]
- Unit tests results should not be displayed in 'automake output' mode
[PR #3232 - @eduar-hte]
- Replace usage of std::ctime, which is not safe in
multithread contexts
[PR #3228 - @eduar-hte]
- Removed unnecessary lock to call acmp_process_quick in Pm::evaluate
[PR #3227 - @eduar-hte]
- feat: Check if the MP header contains invalid character
[PR #3225 - @airween]
- Prevent concurrent access to data in InMemoryPerProcess'
resolveXXX methods
[PR #3216 - @eduar-hte]
- Remove several string copies and unnecessary heap allocations
[PR #3222 - @eduar-hte]
- Creating a std::string with a null pointer
is undefined behaviour
[PR #3220 - @eduar-hte]
- Simplifiy configuration to build using std C++17
[PR #3219 - @eduar-hte]
- Remove unnecessary dynamic casts
[PR #3218 - @eduar-hte]
- fix: Sonarcloud reported memleak fixes
[PR #3114 - @airween]
- V3/sonarcloud replace this declaration by a structured
binding declaration
[PR #3217 - @gberkes]
- Do not assume ModSecurityIntervention argument to
transaction::intervention has been initialized/cleaned
[PR #3212 - @eduar-hte]
- Refactor: used the init-statement to declare "pos" inside the
if statement
[PR #3214 - @gberkes]
- Refactor: moved 3 #include directives to the top of the file.
[PR #3213 - @gberkes]
- Fix SecRemoteRules regression test not to depend on a
specific error message
[PR #3211 - @eduar-hte]
- Fixed shared files deadlock in a multi-threaded Windows application
[PR #3210 - @eduar-hte]
- Add cleanup methods to complete C based ABI
[PR #3209 - @eduar-hte]
- Build on macOS with Apple silicon (arm64)
[PR #3208 - @eduar-hte]
- remove 'this throw' call in transaction
[PR #3207 - @gberkes]
- New API function: set hostname for log
[PR #3203 - @airween]
- Fixing typo in Dockerfile
[PR #3189 - @bitbehz]
- Simplify checkout of submodules in GitHub workflows (with support for git describe)
[PR #3185 - @eduar-hte]
- Update README.md: use submodule and use benchmark tool
[PR #3182 - @airween]
- Improve performance of VariableOrigin instances
[PR #3164 - @eduar-hte]
- Update libinjection & Mbed TLS
[PR #3161 - @eduar-hte]
- chore: add PR template (v3)
[PR #3160 - @fzipi]
- Update to seclang-scanner changes introduced by Windows support
[PR #3146 - @eduar-hte]
- GitHub build & quality assurance workflow updates
[PR #3144 - @eduar-hte]
- Add link to Rust bindings in README
[PR #3141 - @rkrishn7]
- Remove cppcheck suppressions with line numbers in test/cppcheck_suppressions.txt
[PR #3134 - @eduar-hte]
- Add support to build libModSecurity v3 on Windows
[PR #3132 - @eduar-hte]
- fix: update submodule url
[PR #3128 - @fzipi]
- fix(rbl): typo in rbl check selector
[PR #3127 - @fzipi]
- fix: Changed 'equal_range()' + loop by 'find()' in resolveFirst() methods
[PR #3117 - @airween]
- Deleted redundant code in 'ModSecurity::serverLog(...)'.
[PR #3116 - @gberkes]
- doc: Update CHANGES
[PR #3101 - @airween]
- Reduce the scope of variables in a for loop
[PR #3098 - @devzero2000]
- Clean up 'return' never will be executed.
[PR #3096 - @gberkes]
- fix: Replace obsolete macros
[PR #3095 - @airween]
- fix: Change 'SecEngineStatus' to Off by default
[PR #3092 - @airween]
- chore: update bug-report-for-version-3-x.md
[PR #3086 - @fzipi]
- test: Logical, syntax and cosmetic fixes on test cases
[PR #3080 - @MirkoDziadzka, @airween]
- Bump the C++ version from C++11 to C++17
[PR #3079 - @MirkoDziadzka]
- fix: makes uri decode platform independent
[PR #3016 - @M4tteoP]
v3.0.12 - 2024-Jan-30
---------------------
- Change REQUEST_FILENAME and REQUEST_BASENAME behavior
[Issue #3048 - @martinhsv, @theMiddleBlue, @theseion, @M4tteoP, @airween]
- Set the minimum security protocol version for SecRemoteRules
[Issue security/code-scanning/2 - @airween]
v3.0.11 - 2023-Dec-06
---------------------
- Add WRDE_NOCMD to wordexp call
[Issue #3024 - @sahruldotid, @martinhsv]
- Fix: validateDTD compile fails if when libxml2 not installed
[Issue #3014 - @zangobot, @martinhsv]
- Fix memory leak of validateDTD's dtd object
[Issue #3008 - @martinhsv, @zimmerle]
- Fix memory leaks in ValidateSchema
[Issue #3005 - @martinhsv, @zimmerle]
- Add support for expirevar action
[Issue #1803, #3001 - @martinhsv]
- Fix: lmdb regex match on non-null terminated string
[Issue #2985 - @martinhsv]
- Fix memory leaks in lmdb code (new'd strings)
[Issue #2983 - @martinhsv]
- Configure: add additional name to pcre2 pkg-config list
[Issue #2939 - @agebhar1, @fzipi, @martinhsv]
v3.0.10 - 2023-Jul-25
---------------------
- Fix: worst-case time in implementation of four transformations
[Issue #2934 - @martinhsv]
- Add TX synonym for MSC_PCRE_LIMITS_EXCEEDED
[Issue #2901 - @airween]
- Make MULTIPART_PART_HEADERS accessible to lua
[Issue #2916 - @martinhsv]
- Fix: Lua scripts cannot read whole collection at once
[Issue #2900 - @udi-aharon, @airween, @martinhsv]
- Fix: quoted Include config with wildcard
[Issue #2905 - @wiseelf, @airween, @martinhsv]
- Support isolated PCRE match limits
[Issue #2736 - @brandonpayton, @martinhsv]
- Fix: meta actions not applied if multiMatch in first rule of chain
[Issue #2867, #2868 - @mlevogiannis, @martinhsv]
- Fix: audit log may omit tags when multiMatch
[Issue #2866 - @mlevogiannis]
- Exclude CRLF from MULTIPART_PART_HEADER value
[Issue #2870 - @airween, @martinhsv]
- Configure: use AS_ECHO_N instead echo -n
[Issue #2894 - @liudongmiao, @martinhsv]
- Adjust position of memset from 2890
[Issue #2891 - @mirkodziadzka-avi, @martinhsv]
- Add test: empty lines in ipMatchFromFile test
[Issue #2846 - @tomsommer]
v3.0.9 - 2023-Apr-12
--------------------
- Fix: possible segfault on reload if duplicate ip+CIDR in ip match list
[Issue #2877, #2890 - @tomsommer, @martinhsv]
- Add some member variable inits in Transaction class (possible segfault)
[Issue #2886 - @GNU-Plus-Windows-User, @airween, @mdounin, @martinhsv]
- Resolve memory leak on reload (bison-generated variable)
[Issue #2876 - @martinhsv]
- Support equals sign in XPath expressions
[Issue #2328 - @dennus, @martinhsv]
- Encode two special chars in error.log output
[Issue #2854 - @airween, @martinhsv]
- Add JIT support for PCRE2
[Issue #2791 - @wfjsw, @airween, @FireBurn, @martinhsv]
- Support comments in ipMatchFromFile file via '#' token
[Issue #2554 - @tomsommer, @martinhsv]
- Use name package name libmaxminddb with pkg-config
[Issue #2595, #2596 - @frankvanbever, @ffontaine, @arnout]
- Fix: FILES_TMP_CONTENT collection key should use part name
[Issue #2831 - @airween]
- Use AS_HELP_STRING instead of obsolete AC_HELP_STRING macro
[Issue #2806 - @hughmcmaster]
- During configure, do not check for pcre if pcre2 specified
[Issue #2750 - @dvershinin, @martinhsv]
- Use pkg-config to find libxml2 first
[Issue #2714 - @hughmcmaster]
- Fix two rule-reload memory leak issues
[Issue #2801 - @Abce, @martinhsv]
- Correct whitespace handling for Include directive
[Issue #2800 - @877509395, @martinhsv]
v3.0.8 - 2022-Sep-07
--------------------
- Adjust parser activation rules in modsecurity.conf-recommended
[Issue #2796 - @terjanq, @martinhsv]
- Multipart parsing fixes and new MULTIPART_PART_HEADERS collection
[Issue #2795 - @terjanq, @martinhsv]
- Prevent LMDB related segfault
[Issue #2755, #2761 - @dvershinin]
- Fix msc_transaction_cleanup function comment typo
[Issue #2788 - @lookat23]
- Fix: MULTIPART_INVALID_PART connected to wrong internal variable
[Issue #2785 - @martinhsv]
- Restore Unique_id to include random portion after timestamp
[Issue #2752, #2758 - @datkps11, @martinhsv]
v3.0.7 - 2022-May-30
--------------------
- Move PCRE2 match block from member variable
[@martinhsv]
- Add SecArgumentsLimit, 200007 to modsecurity.conf-recommended
[Issue #2738 - @jleproust, @martinhsv]
- Fix memory leak when concurrent log includes REMOTE_USER
[Issue #2727 - @liudongmiao]
- Fix LMDB initialization issues
[Issue #2688 - @ziollek, @martinhsv]
- Fix initcol error message wording
[Issue #2732 - @877509395, @martinhsv]
- Tolerate other parameters after boundary in multipart C-T
[Issue #1900 - @martinhsv]
- Add DebugLog message for bad pattern in rx operator
[Issue #2723 - @martinhsv]
- Support PCRE2
[Issue #2668 - @martinhsv]
- Support SecRequestBodyNoFilesLimit
[Issue #2670 - @airween, @martinhsv]
- Fix misuses of LMDB API
[Issue #2601, #2602 - @hyc]
- Fix duplication typo in code comment
[Issue #2677 - @gleydsonsoares]
- Add ctl:auditEngine action support
[Issue #2606 - @alekravch, @martinhsv]
- Fix multiMatch msg, etc, population in audit log
[Issue #2573 - @Sachin-M-Desai, @martinhsv]
- Fix some name handling for ARGS_*NAMES: regex SecRuleUpdateTargetById, etc.
[Issue #2627, #2648 - @lontchianicet, @victorserbu2709, @martinhsv]
- Adjust confusing variable name in setRequestBody method
[Issue #2635 - @Mesar-Ali, @martinhsv]
- Multipart names/filenames may include single quote if double-quote enclosed
[Issue #2352 - @martinhsv]
- Add SecRequestBodyJsonDepthLimit to modsecurity.conf-recommended
[Issue #2647 - @theMiddleBlue, @airween, @877509395 ,@martinhsv]
v3.0.6 - 2021-Nov-19
--------------------
- Support configurable limit on depth of JSON parsing
[@theMiddleBlue, @martinhsv]
v3.0.5 - 2021-Jul-07
--------------------
- Handle URI received with uri-fragment
[@martinhsv]
- Having ARGS_NAMES, variables proxied
[@zimmerle, @martinhsv, @KaNikita]
- Use explicit path for cross-compile environments.
[Issue #2485 - @dtoubelis]
- Fix: FILES variable does not use multipart part name for key
[Issue #2377 - @martinhsv]
- Replaces put with setenv in SetEnv action
[Issue #2469 - @martinhsv, @WGH-, @zimmerle]
- Regression: Mark the test as failed in case of segfault.
[@zimmerle]
- Regex key selection should not be case-sensitive
[Issue #2296, #2107, #2297 - @michaelgranzow-avi, @victorhora,
@airween, @martinhsv, @zimmerle]
- Fix: Only delete Multipart tmp files after rules have run
[Issue #2427 - @martinhsv]
- Fixed MatchedVar on chained rules
[Issue #2423, #2435, #2436 - @michaelgranzow-avi]
- Add support for new operator rxGlobal
[@martinhsv]
- Fix maxminddb link on FreeBSD
[Issue #2131 - @granalberto, @zimmerle]
- Fix IP address logging in Section A
[Issue #2300 - @inaratech, @zavazingo, @martinhsv]
- Adds support to lua 5.4
[@zimmerle]
- GeoIP: switch to GEOIP_MEMORY_CACHE from GEOIP_INDEX_CACHE
[Issues #2378, #2186 - @defanator]
- rx: exit after full match (remove /g emulation); ensure capture
groups occuring after unused groups still populate TX vars
[Issue #2336 - @martinhsv]
- Correct CHANGES file entry for #2234
- Add support to test framework for audit log content verification
and add regression tests for issues #2000, #2196
- Support configurable limit on number of arguments processed
[Issue #2234 - @jleproust, @martinhsv]
- Multipart Content-Dispostion should allow field: filename*=
[@martinhsv]
- Fix rule-update-target for non-regex
[Issue 2251 - @martinhsv]
- Fix configure script when packaging for Buildroot
[Issue 2235 - @frankvanbever]
- modsecurity.pc.in: add Libs.private
[Issue #1918, #2253 - @ffontaine, @Dridi, @victorhora]
v3.0.4 - 2020-Jan-13
--------------------
- Fix: audit log data omitted when nolog,auditlog
[@martinhsv]
- Fix: ModSecurity 3.x inspectFile operator does not pass
FILES_TMPNAMES parameter to lua engine
[Issue #2204, #2205 - @kadirerdogan]
- XML: Remove error messages from stderr
[Issue #2010 - @JaiHarpalani, @zimmerle]
- Filter comment or blank line for pmFromFile operator
[Issue #1645 - @LeeShan87, @victorhora, @tdoubley]
- Additional adjustment to Cookie header parsing
[@martinhsv]
- Restore chained rule part H logging to be more like 2.9 behaviour
[Issue #2196 - @martinhsv]
- Small fixes in log messages to help debugging the file upload
[Issue #2130 - @airween]
- Fix Cookie header parsing issues
[Issue #2201 - @airween, @martinhsv]
- Fix rules with nolog are logging to part H
[Issue #2196 - @martinhsv]
- Fix argument key-value pair parsing cases
[Issue #1904 - @martinhsv]
- Fix: audit log part for response body for JSON format to be E
[Issue #2066 - @martinhsv, @zimmerle]
- Make sure m_rulesMessages is filled after successfull match
[Issue #2000, #2048 - @victorhora, @defanator]
- Fix @pm lookup for possible matches on offset zero.
[@zimmerle, @afoxdavidi, @martinhsv, @marshal09]
- Regex lookup on the key name instead of COLLECTION:key
[@rdiperri-yottaa, @danbiagini-work, @mmelo-yottaa, @zimmerle]
- Missing throw in Operator::instantiate
[Issue #2106 - @marduone]
- Making block action execution dependent of the SecEngine status
[Issue #2113, #2111 - @theMiddleBlue, @airween]
- Making block action execution dependent of the SecEngine status
[Issue #1960 - @theMiddleBlue, @zimmerle, @airween, @victorhora]
- Having body limits to respect the rule engine state
[@zimmerle]
- Fix SecRuleUpdateTargetById does not match regular expressions
[Issue #1872 - @zimmerle, @anush-cr, @victorhora, @j0k2r]
- Adds missing check for runtime ctl:ruleRemoveByTag
[Issue #2102, #2099 - @airween]
- Adds a new operator verifySVNR that checks for Austrian social
security numbers.
[Issue #2063 - @Rufus125]
- Fix variables output in debug logs
[Issue #2057 - @jleproust]
- Correct typo validade in log output
[Issue #2059 - @nerrehmit]
- fix/minor: Error encoding hexa decimal.
[Issue #2068 - @tech-ozon-io]
- Limit more log variables to 200 characters.
[Issue #2073 - @jleproust]
- parser: fix parsed file names
[@zimmerle]
- Allow empty anchored variable
[Issue #2024 - @airween]
- Fixed FILES_NAMES collection after the end of multipart parsing
[Issue #2016 - @airween]
- Fixed validateByteRange parsing method
[Issue #2017 - @airween]
- Removes a memory leak on the JSON parser
[@zimmerle]
- Enables LMDB on the regression tests.
[Issue #2011, #2008 - @WGH-, @mdunc]
- Fix: Extra whitespace in some configuration directives causing error
[Issue #2006 - @porjo, @zimmerle]
- Refactoring on Regex and SMatch classes.
[@WGH-]
- Fixed buffer overflow in Utils::Md5::hexdigest()
[Issue #2002 - @defanator]
- Implemented merge() method for ConfigInt, ConfigDouble, ConfigString
[Issue #1990 - @defanator]
- Adds initially support to the drop action.
[@zimmerle]
- Complete merging of particular rule properties
[Issue #1978 - @defanator]
- Replaces AC_CHECK_FILE with 'test -f'
[Issue #1984 - @chuckwolber]
- Fix inet addr handling on 64 bit big endian systems
[Issue #1980 - @airween]
- Fix tests on FreeBSD
[Issue #1973 - @defanator]
- Changes ENV test case to read the default MODSECURTIY env var
[Issue #1969 - @zimmerle, @airween, @inittab]
- Regression: Sets MODSECURITY env var during the tests execution
[Issue #1969 - @zimmerle, @airween, @inittab]
- Fix setenv action to strdup key=variable
[@zimmerle]
- Allow 0 length JSON requests.
[Issue #1822 - @allanbomsft, @zimmerle, @victorhora, @marcstern]
- Fix "make dist" target to include default configuration
[Issue #1966 - @defanator]
- Replaced log locking using mutex with fcntl lock
[Issue #1949, #1927 - @Cloaked9000]
- Correct the usage of modsecurity::Phases::NUMBER_OF_PHASES
[Issue #1959 - @weliu]
- Adds support to multiple ranges in ctl:ruleRemoveById
[Issue #1956 - @theseion, @victorhora, @zimmerle]
- Rule variable interpolation broken
[Issue #1961 - @soonum, @zimmerle]
- Make the boundary check less strict as per RFC2046
[Issue #1943 - @victorhora, @allanbomsft]
- Fix buffer size for utf8toUnicode transformation
[Issue #1208 - @katef, @victorhora]
v3.0.3 - 2018-Nov-05
--------------------
- Fix double macros bug
[Issue #1943 - @supplient, @zimmerle]
- Override the default status code if not suitable to redirect action
[Issue #1850 - @zimmerle, @victorhora]
- parser: Fix the support for CRLF configuration files
[Issue #1945 - @zimmerle, @defanator, @kjakub]
- Organizes the server logs
[0xb7c36 and 0x5ac20 - @zimmerle, @steven-j-wojcik]
- m_lineNumber in Rule not mapping with the correct line number in file
[Issue #1844 - @zimmerle, @victorhora, @xizeng]
- Using shared_ptr instead of unique_ptr on rules exceptions
[Issue #1697 - @zimmerle, @brianp9906, @victorhora, @LeSwiss, @defanator]
- Changes debuglogs schema to avoid unecessary str allocation
[0xb2840 - @zimmerle]
- Fix the SecUnicodeMapFile and SecUnicodeCodePage
[0x3094d - @zimmerle, @victorhora]
- Changes the timing to save the rule message
[0xca270 - @zimmerle]
- Fix crash in msc_rules_add_file() when using disruptive action in chain
[Issue #1849 - @victorhora, @zimmerle, @rperper]
- Fix memory leak in AuditLog::init()
[Issue #1897 - @weliu]
- Fix RulesProperties::appendRules()
[Issue #1901 - @steven-j-wojcik]
- Fix RULE lookup in chained rules
[0x3077c - @zimmerle]
- @ipMatch "Could not add entry" on slash/32 notation in 2.9.0
[Issue #849 - @zimmerle, @dune73]
- Using values after transformation at MATCHED_VARS
[0x14316 - @zimmerle]
- Adds support to UpdateActionById.
[Issue #1800 - @zimmerle, @victorhora, @NisariAIT]
- Add correct C function prototypes for msc_init and msc_create_rule_set
[Issue #1922 - @steven-j-wojcik]
- Allow LuaJIT 2.1 to be used
[Issue #1909 - @victorhora, @mdunc]
- Match m_id JSON log with RuleMessage and v2 format
[Issue #1185 - @victorhora]
- Adds support to setenv action.
[Issue #1044 - @zimmerle]
- Adds new transaction constructor that accepts the transaction id
as parameter.
[Issue #1627 - @defanator, @zimmerle]
- Adds request IDs and URIs to the debug log
[Issue #1627 - @defanator, @zimmerle]
- Treating variables exception on load-time instead of run time.
[0x028e0 and 0x275a1 - @zimmerle]
- Fix: function m.setvar in Lua scripts and add testcases
[Issue #1859 - @nowaits, @victorhora]
- Fix SecResponseBodyAccess and ctl:requestBodyAccess directives
[Issue #1531 - @victorhora, @defanator]
- Fix OpenBSD build
[Issue #1841 - @victorhora, @zimmerle, @juanfra684]
- Fix parser to support GeoLookup with MaxMind
[Issue #1884, #1895 - @victorhora, @everping]
- parser: Fix simple quote setvar in the end of the line
[Issue #1831 - @zimmerle, @csanders-git]
- Fix pc file
[Issue #1847 - @gquintard]
- modsec_rules_check: uses the gnu `.la' instead of `.a' file
[Issue #1853 - @ste7677, @victorhora, @zimmerle]
- good practices: Initialize variables before use it
[Issue #1889 - Marc Stern]
- Fix utf-8 character encoding conversion
[Issue #1794 - @tinselcity, @zimmerle]
- Adds support for ctl:requestBodyProcessor=URLENCODED
[Issue #1797 - @victorhora]
- Add LUA compatibility for CentOS and try to use LuaJIT first if available
[Issue #1622 - @victorhora, @dmitryzykov]
- Allow LuaJIT to be used
[Issue #1809 - @victorhora, @p0pr0ck5]
- Implement support for Lua 5.1
[Issue #1809 - @p0pr0ck5, @victorhora]
- Variable names must match fully, not partially. Match should be case
insensitive.
[Issue #1818, #1820, #1810, #1808 - @michaelgranzow-avi, @victorhora,
@theMiddleBlue, @airween, @zimmerle,
@LeeShan87]
- Improves the performance while loading the rules
[Issue #1735 - @zimmerle, @p0pr0ck5, @victorhora]
- Allow empty strings to be evaluated by regex::searchAll
[Issue #1799, #1785 - @victorhora, @XuanHuyDuong, @zimmerle]
- Adds basic pkg-config info
[Issue #1790 - @gquintard, @zimmerle]
- Fixed LMDB collection errors
[Issue #1787 - @airween, @zimmerle]
- Fixed false positive MULTIPART_UNMATCHED_BOUNDARY errors
[Issue #1747, #1924 - @airween, @victorhora, @defanator, @zimmerle]
- Fix ip tree lookup on netmask content
[Issue #1793 - @tinselcity, @zimmerle]
- Changes the behavior of the default sec actions
[Issue #1629 - @mirkodziadzka-avi, @zimmerle, @victorhora]
- Refactoring on {global,ip,resources,session,tx,user} collections
[Issue #1754, #1778 - @LeeShan87, @zimmerle, @victorhora, @wwd5613,
@sobigboy]
- Fix race condition in UniqueId::uniqueId()
[Issue #1786 - @weliu]
- Fix memory leak in error message for msc_rules_merge C APIs
[Issue #1765 - @weliu]
- Return false in SharedFiles::open() when an error happens
[Issue #1783 - @weliu]
- Use rvalue reference in ModSecurity::serverLog
[Issue #1769 - @weliu]
- Build System: Fix when multiple lines for curl version.
[Issue #1771 - @Artistan]
- Checks if response body inspection is enabled before process it
[Issue #1643 - @zoltan-fedor, @dennus, @defanator, @zimmerle]
- Code Cleanup.
[Issue #1757, #1755, #1756, #1761 - @p0pr0ck5]
- Fix setvar parsing of quoted data
[Issue #1733, #1759, #1775 - @victorhora, @JaiHarpalani, @defanator]
- Fix LDFLAGS for unit tests.
[Issue #1758 - @smlx]
- Adds time stamp back to the audit logs
[Issue #1762 - @Pjack, @zimmerle]
- Disables skip counter if debug log is disabled
[@zimmerle]
- Cosmetics: Represents amount of skipped rules without decimal
[Issue #1737 - @p0pr0ck5]
- Add missing escapeSeqDecode, urlEncode and trimLeft/Right tfns to parser
[Issue #1752 - @victorhora]
- Fix STATUS var parsing and accept STATUS_LINE var for v2 backward comp.
[Issue #1738 - @victorhora]
- Fix memory leak in modsecurity::utils::expandEnv()
[Issue #1750 - @defanator]
- Initialize m_dtd member in ValidateDTD class as NULL
[Issue #1751 - @airween]
- Fix broken @detectxss operator regression test case
[Issue #1739 - @p0pr0ck5]
- Fix utils::string::ssplit() to handle delimiter in the end of string
[Issue #1743, #1744 - @defanator]
- Fix variable FILES_TMPNAMES
[Issue #1646, #1610 - @victorhora, @zimmerle, @defanator]
- Fix memory leak in Collections
[Issue #1729, #1730 - @defanator]
v3.0.2 - 2018-Apr-03
--------------------
- Fix lib version information while generating the .so file
[@gl1f1v21, @zimmerle]
v3.0.1 - 2018-Apr-02
--------------------
- Adds support for ctl:ruleRemoveByTag
[@zimmerle, @weliu]
- Fix SecUploadDir configuration merge
[Issue #1720 - @zimmerle, @gjvanetten]
- Include all prerequisites for "make check" into dist archive
[Issue #1716 - @defanator]
- Fix: Reverse logic of checking output in @inspectFile
[Issue #1715 - @defanator]
- Adds support to libMaxMind
[Issue #1307 - @zimmerle, @defanator]
- Adds capture action to detectXSS
[Issue #1698 - @victorhora]
- Temporarily accept invalid MULTIPART_SEMICOLON_MISSING operator
[Issue #1701 - @victorhora]
- Adds capture action to detectSQLi
[Issue #1698 - @zimmerle]
- Adds capture action to rbl
[Issue #1698 - @zimmerle]
- Adds capture action to verifyCC
[Issue #1698 - @michaelgranzow-avi, @zimmerle]
- Adds capture action to verifySSN
[Issue #1698 - @zimmerle]
- Adds capture action to verifyCPF
[Issue #1698 - @zimmerle]
- Prettier error messages for unsupported configurations (UX)
[@victorhora]
- Add missing verify*** transformation statements to parser
[Issue #1006 and #1007 - @victorhora]
- Fix a set of compilation warnings
[Issue #1650 - @zimmerle, @JayCase]
- Check for disruptive action on SecDefaultAction.
[Issue #1614 - @zimmerle, @michaelgranzow-avi]
- Fix block-block infinite loop.
[Issue #1614 - @zimmerle, @michaelgranzow-avi]
- Correction remove_by_tag and remove_by_msg logic.
[Issue #1636 - @Minasu]
- Fix LMDB compile error
[Issue #1691 - @airween]
- Fix msc_who_am_i() to return pointer to a valid C string
[Issue #1640 - @defanator]
- Added some cosmetics to autoconf related code
[Issue #1652 - @airween]
- Fix "make dist" target to include necessary headers for Lua
[Issue #1678 - @defanator]
- Fix "include /foo/*.conf" for single matched object in directory
[Issue #1677 - @defanator, @zimmerle]
- Add missing Base64 transformation statements to parser
[Issue #1632 - @victorhora, @zimmerle]
- Fixed resource load on ip match from file
[#1674 - @zimmerle, @StefaanSeys]
- Fixed examples compilation while using disable-shared
[#1670 - @zimmerle, @ivanbaldo]
- Fixed compilation issue while xml is disabled
[0x243028 - @zimmerle]
- Having LDADD and LDFLAGS organized on Makefile.am
[0xd0e85e - @zimmerle]
- Checking std::deque size before use it
[0x217cbf - @zimmerle, Yaron Dayagi]
- perf improvement: Added the concept of RunTimeString and removed
all run time parser.
[0x3eae51 0x0320e0 0xb5688f 0xfe47a9 0xfa9842 0x1affc3 0x079de4
0xc7c04f 0x5262ea 0x01974a 0xd5ee1e - @zimmerle]
- perf improvement: Checks debuglog level before format debug msg
[0x42ee9 - @zimmerle]
- perf. improvement/rx: Only compute dynamic regex in case of macro
[0x91ff3 - @zimmerle]
- Fix uri on the benchmark utility
[0x63bec - @zimmerle]
- disable Lua on systems with liblua5.1
[Issue #1639 - @victorhora, @defanator]
v3.0.0 - 2017-Dec-13
--------------------
- Improvements on LUA build scripts and support for LUA 5.2.
[Issue #1617 and #1622 - @victorhora, @zimmerle]
- Fix compilation error with disable_debug_log flag
[0xfd84e - Izik Abramov]
- Improvements on the benchmark tool.
[Issue #1615 - @zimmerle]
- Fix lua headers on the build scripts
[Issue #1621 - @Minasu]
- Refactoring on the JSON parser.
[Issue #1576, #1577 - Tobias Gutknecht, @zimmerle, @victorhora, @marcstern]
- Adds support to WEBAPPID variable.
[Issue #1027 - @zimmerle, @victorhora]
- Adds support for SecWebAppId.
[Issue #1442 - @zimmerle, @victorhora]
- Adds support for SecRuleRemoveByTag.
[Issue #1476 - @zimmerle, @victorhora]
- Adds support for update target by message.
[Issue #1474 - @zimmerle, @victorhora]
- Adds support to SecRuleScript directive.
[Issue #994 - @zimmerle]
- Adds support for the exec action.
[Issue #1050 - @zimmerle]
- Adds support for transformations inside Lua engine
[Issue #994 - @zimmerle]
- Adds initial support for Lua engine.
[Issue #994 - @zimmerle]
- Adds support for @inspectFile operator.
[Issue #999 - @zimmerle, @victorhora]
- Adds support for RESOURCE variable collection.
[Issue #1014 - @zimmerle, @victorhora]
- Adds support for @fuzzyHash operator.
[Issue #997 - @zimmerle]
- Fix build on non x86 arch build
[Issue #1598 - @athmane]
- Fix memory issue while changing rule target dynamic
[Issue #1590 - @zimmerle, @slabber]
- Fix log while displaying the name of a dict selection by regex.
[@zimmerle]
- Setting http response code on the auditlog.
[Issue #1592 - @zimmerle]
- Refactoring on RuleMessage class, now accepting http code as parameter.
[@zimmerle]
- Having disruptive msgs as disruptive [instead of warnings] on audit log
[Issue #1592 - @zimmerle, @nobodysz]
- Parser: Pipes are no longer welcomed inside regex dict element selection.
[Issue #1591 - @zimmerle, @slabber]
- Avoids unicode initialization on every rules object
[Issue #1563 - @zimmerle, @Tiki-God, @sethinsd, @Cloaked9000, @AnoopAlias,
@intelbg]
- Makes clear to the user whenever the audit log is empty due to missing
JSON support.
[Issue #1585 - @zimmerle]
- Makes auditlog more verbose on debug logs
[Issue: #1559 - @zimmerle]
- Enable support for AuditLogFormat
Issue: #1583, #1493 and #1453 - @victorhora]
- Adds macro expansion for @rx operator
[Issue: #1528, #1536 - @asterite3, @zimmerle]
- Consideres under quoted variable while loading the rules.
[Felipe Zimmerle/@zimmerle, Victor Hora/@victorhora]
- Store the connection and url parameters in std::string
[Issue: #1571 - @majordaw]
- Eliminate some reorder and sign warnings
[Issue: #1572 - Dávid Major/@majordaw]
- Makes parallel logging to work when SELinux is enabled.
[Issue: #1562 - David Buckle/@met3or]
- Adds possibility to run the pm operator inside a mutex to avoid concurrent
access while working on a thread environment. This option is a compilation
flag.
[Felipe Zimmerle/@zimmerle]
v3.0.0-rc1 - 2017-Aug-28
------------------------
Very first public version.
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: Makefile.am
================================================
if TEST_UTILITIES
export MAYBE_TEST = test
endif
if EXAMPLES
export MAYBE_EXAMPLES = examples
endif
SUBDIRS = \
others \
src \
doc \
tools \
$(MAYBE_EXAMPLES) \
$(MAYBE_TEST)
# make clean
CLEANFILES =
ACLOCAL_AMFLAGS = -I build
# make maintainer-clean
MAINTAINERCLEANFILES = \
aclocal.m4 \
ar-lib \
build/libtool.m4 \
build/lt~obsolete.m4 \
build/ltoptions.m4 \
build/ltsugar.m4 \
build/ltversion.m4 \
coding-style.txt \
compile \
config.guess \
config.sub \
configure \
cppcheck.txt \
depcomp \
install-sh \
ltmain.sh \
Makefile.in \
missing \
test/modsec-shared-collections \
test/modsec-shared-collections-lock \
test-suite-drd.log \
test-suite-helgrind.log \
test-suite-memcheck.log \
ylwrap
parser:
cat src/parser/seclang-parser.hh | sed "s/return \*new (yyas_<T> ()) T (t)/return *new (yyas_<T> ()) T (std::move((T\&)t))/g" > src/parser/seclang-parser.hh.fix && mv src/parser/seclang-parser.hh.fix src/parser/seclang-parser.hh
cppcheck:
@cppcheck -U YYSTYPE -U MBEDTLS_MD5_ALT -U MBEDTLS_SHA1_ALT \
-D MS_CPPCHECK_DISABLED_FOR_PARSER -U YY_USER_INIT \
--suppressions-list=./test/cppcheck_suppressions.txt \
--inline-suppr \
--enable=warning,style,performance,portability,unusedFunction,missingInclude \
--inconclusive \
--template="warning: {file},{line},{severity},{id},{message}" \
-I headers -I . -I $(top_srcdir)/others -I $(top_srcdir)/src -I $(top_srcdir)/others/mbedtls/include \
--error-exitcode=1 \
-i "src/parser/seclang-parser.cc" -i "src/parser/seclang-scanner.cc" \
-i others \
--std=c++17 \
--force --verbose .
check-static: cppcheck
check-style: check-coding-style
check-coding-style:
@cpplint.py \
$$(find . -name "*.h" -o -name "*.cc" | xargs) 2>&1 \
| egrep -v $$(echo -n "catchall" ; \
for i in $$(cat test/coding_style_suppressions.txt); do echo -n "|"$$i; done) \
| sed 's/^\./warning: ./g' > coding-style.txt
-cat coding-style.txt
@VALGRIND_CHECK_RULES@
VALGRIND_SUPPRESSIONS_FILES = valgrind_suppressions.txt
LOG_DRIVER = env $(SHELL) $(top_srcdir)/test/custom-test-driver
AM_TESTS_ENVIRONMENT=AUTOMAKE_TESTS=true; export AUTOMAKE_TESTS;
LOG_COMPILER=test/test-suite.sh
TESTS=
include test/test-suite.in
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = modsecurity.pc
EXTRA_DIST = modsecurity.pc.in \
modsecurity.conf-recommended \
unicode.mapping
================================================
FILE: README.md
================================================
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./others/modsec_white_bg.png">
<source media="(prefers-color-scheme: light)" srcset="./others/modsec.png">
<img src="./others/modsec.png" width="50%">
</picture>

[](https://sonarcloud.io/dashboard?id=owasp-modsecurity_ModSecurity)
[](https://sonarcloud.io/dashboard?id=owasp-modsecurity_ModSecurity)
[](https://sonarcloud.io/dashboard?id=owasp-modsecurity_ModSecurity)
[](https://sonarcloud.io/dashboard?id=owasp-modsecurity_ModSecurity)
[](https://sonarcloud.io/dashboard?id=owasp-modsecurity_ModSecurity)
Libmodsecurity is one component of the ModSecurity v3 project. The library
codebase serves as an interface to ModSecurity Connectors taking in web traffic
and applying traditional ModSecurity processing. In general, it provides the
capability to load/interpret rules written in the ModSecurity SecRules format
and apply them to HTTP content provided by your application via Connectors.
If you are looking for ModSecurity for Apache (aka ModSecurity v2.x), it is still under maintenance and available:
[here](https://github.com/owasp-modsecurity/ModSecurity/tree/v2/master).
### What is the difference between this project and the old ModSecurity (v2.x.x)?
* All Apache dependencies have been removed
* Higher performance
* New features
* New architecture
Libmodsecurity is a complete rewrite of the ModSecurity platform. When it was first devised the ModSecurity project started as just an Apache module. Over time the project has been extended, due to popular demand, to support other platforms including (but not limited to) Nginx and IIS. In order to provide for the growing demand for additional platform support, it has became necessary to remove the Apache dependencies underlying this project, making it more platform independent.
As a result of this goal we have rearchitected Libmodsecurity such that it is no longer dependent on the Apache web server (both at compilation and during runtime). One side effect of this is that across all platforms users can expect increased performance. Additionally, we have taken this opportunity to lay the groundwork for some new features that users have been long seeking. For example we are looking to natively support auditlogs in the JSON format, along with a host of other functionality in future versions.
### It is no longer just a module.
The 'ModSecurity' branch no longer contains the traditional module logic (for Nginx, Apache, and IIS) that has traditionally been packaged all together. Instead, this branch only contains the library portion (libmodsecurity) for this project. This library is consumed by what we have termed 'Connectors' these connectors will interface with your webserver and provide the library with a common format that it understands. Each of these connectors is maintained as a separate GitHub project. For instance, the Nginx connector is supplied by the ModSecurity-nginx project (https://github.com/owasp-modsecurity/ModSecurity-nginx).
Keeping these connectors separated allows each project to have different release cycles, issues and development trees. Additionally, it means that when you install ModSecurity v3 you only get exactly what you need, no extras you won't be using.
# Compilation
Before starting the compilation process, make sure that you have all the
dependencies in place. Read the subsection “Dependencies” for further
information.
After the compilation make sure that there are no issues on your
build/platform. We strongly recommend the utilization of the unit tests and
regression tests. These test utilities are located under the subfolder ‘tests’.
As a dynamic library, don’t forget that libmodsecurity must be installed to a location (folder) where you OS will be looking for dynamic libraries.
### Unix (Linux, MacOS, FreeBSD, …)
On unix the project uses autotools to help the compilation process. Please note that if you are working with `git`, don't forget to initialize and update the submodules. Here's a quick how-to:
```shell
$ git clone --recursive https://github.com/owasp-modsecurity/ModSecurity ModSecurity
$ cd ModSecurity
```
You can then start the build process:
```shell
$ ./build.sh
$ ./configure
$ make
$ sudo make install
```
Details on distribution specific builds can be found in our Wiki:
[Compilation Recipes](https://github.com/owasp-modsecurity/ModSecurity/wiki/Compilation-recipes)
### Windows
Windows build information can be found [here](build/win32/README.md).
## Dependencies
This library is written in C++ using the C++17 standards. It also uses Flex
and Yacc to produce the “Sec Rules Language” parser. Other, mandatory dependencies include YAJL, as ModSecurity uses JSON for producing logs and its testing framework, libpcre (not yet mandatory) for processing regular expressions in SecRules, and libXML2 (not yet mandatory) which is used for parsing XML requests.
All others dependencies are related to operators specified within SecRules or configuration directives and may not be required for compilation. A short list of such dependencies is as follows:
* libinjection is needed for the operator @detectXSS and @detectSQL
* curl is needed for the directive SecRemoteRules.
If those libraries are missing ModSecurity will be compiled without the support for the operator @detectXSS and the configuration directive SecRemoteRules.
# Library documentation
The library documentation is written within the code in Doxygen format. To generate this documentation, please use the doxygen utility with the provided configuration file, “doxygen.cfg”, located with the "doc/" subfolder. This will generate HTML formatted documentation including usage examples.
# Library utilization
The library provides a C++ and C interface. Some resources are currently only
available via the C++ interface, for instance, the capability to create custom logging
mechanism (see the regression test to check for how those logging mechanism works).
The objective is to have both APIs (C, C++) providing the same functionality,
if you find an aspect of the API that is missing via a particular interface, please open an issue.
Inside the subfolder examples, there are simple examples on how to use the API.
Below some are illustrated:
### Simple example using C++
```c++
using ModSecurity::ModSecurity;
using ModSecurity::Rules;
using ModSecurity::Transaction;
ModSecurity *modsec;
ModSecurity::Rules *rules;
modsec = new ModSecurity();
rules = new Rules();
rules->loadFromUri(rules_file);
Transaction *modsecTransaction = new Transaction(modsec, rules);
modsecTransaction->processConnection("127.0.0.1");
if (modsecTransaction->intervention()) {
std::cout << "There is an intervention" << std::endl;
}
```
### Simple example using C
```c
#include "modsecurity/modsecurity.h"
#include "modsecurity/transaction.h"
char main_rule_uri[] = "basic_rules.conf";
int main (int argc, char **argv)
{
ModSecurity *modsec = NULL;
Transaction *transaction = NULL;
Rules *rules = NULL;
modsec = msc_init();
rules = msc_create_rules_set();
msc_rules_add_file(rules, main_rule_uri);
transaction = msc_new_transaction(modsec, rules);
msc_process_connection(transaction, "127.0.0.1");
msc_process_uri(transaction, "http://www.modsecurity.org/test?key1=value1&key2=value2&key3=value3&test=args&test=test");
msc_process_request_headers(transaction);
msc_process_request_body(transaction);
msc_process_response_headers(transaction);
msc_process_response_body(transaction);
return 0;
}
```
# Contributing
You are more than welcome to contribute to this project and look forward to growing the community around this new version of ModSecurity. Areas of interest include: New
functionalities, fixes, bug report, support for beginning users, or anything that you
are willing to help with.
## Providing patches
We prefer to have your patch within the GitHub infrastructure to facilitate our
review work, and our Q.A. integration. GitHub provides excellent
documentation on how to perform “Pull Requests”, more information available
here: https://help.github.com/articles/using-pull-requests/
Please respect the coding style. Pull requests can include various commits, so
provide one fix or one piece of functionality per commit. Please do not change anything outside
the scope of your target work (e.g. coding style in a function that you have
passed by). For further information about the coding style used in this
project, please check: https://www.chromium.org/blink/coding-style
Provides explanative commit messages. Your first line should give the highlights of your
patch, 3rd and on give a more detailed explanation/technical details about your
patch. Patch explanation is valuable during the review process.
### Don’t know where to start?
Within our code there are various items marked as TODO or FIXME that may need
your attention. Check the list of items by performing a grep:
```
$ cd /path/to/modsecurity-nginx
$ egrep -Rin "TODO|FIXME" -R *
```
A TODO list is also available as part of the Doxygen documentation.
### Testing your patch
Along with the manual testing, we strongly recommend you to use the our
regression tests and unit tests. If you have implemented an operator, don’t
forget to create unit tests for it. If you implement anything else, it is encouraged that you develop complimentary regression tests for it.
The regression test and unit test utilities are native and do not demand any
external tool or script, although you need to fetch the test cases from other
repositories, as they are shared with other versions of ModSecurity, those
others repositories git submodules. To fetch the submodules repository and run
the utilities, follow the commands listed below:
```shell
$ cd /path/to/your/ModSecurity
$ git submodule update --init --recursive
$ make check
```
### Debugging
Before start the debugging process, make sure of where your bug is. The problem
could be on your connector or in libmodsecurity. In order to identify where the
bug is, it is recommended that you develop a regression test that mimics the
scenario where the bug is happening. If the bug is reproducible with the
regression-test utility, then it will be far simpler to debug and ensure that it never occurs again. On Linux it is
recommended that anyone undertaking debugging utilize gdb and/or valgrind as needed.
During the configuration/compilation time, you may want to disable the compiler
optimization making your “back traces” populated with readable data. Use the
CFLAGS to disable the compilation optimization parameters:
```shell
$ export CFLAGS="-g -O0"
$ ./build.sh
$ ./configure --enable-assertions=yes
$ make
$ sudo make install
```
"Assertions allow us to document assumptions and to spot violations early in the
development process. What is more, assertions allow us to spot violations with a
minimum of effort." https://dl.acm.org/doi/pdf/10.1145/240964.240969
It is recommended to use assertions where applicable, and to enable them with
'--enable-assertions=yes' during the testing and debugging workflow.
### Benchmarking
The source tree includes a Benchmark tool that can help measure library performance. The tool is located in the `test/benchmark/` directory. The build process also creates the binary here, so you will have the tool after the compilation is finished.
To run, just type:
```shell
cd test/benchmark
$ ./benchmark
Doing 1000000 transactions...
```
You can also pass a lower value:
```shell
$ ./benchmark 1000
Doing 1000 transactions...
```
To measure the time:
```shell
$ time ./benchmark 1000
Doing 1000 transactions...
real 0m0.351s
user 0m0.337s
sys 0m0.022s
```
This is very fast because the benchmark uses the minimal `modsecurity.conf.default` configuration, which doesn't include too many rules:
```shell
$ cat basic_rules.conf
Include "../../modsecurity.conf-recommended"
```
To measure with real rules, run one of the download scripts in the same directory:
```shell
$ ./download-owasp-v3-rules.sh
Cloning into 'owasp-v3'...
remote: Enumerating objects: 33007, done.
remote: Counting objects: 100% (2581/2581), done.
remote: Compressing objects: 100% (907/907), done.
remote: Total 33007 (delta 2151), reused 2004 (delta 1638), pack-reused 30426
Receiving objects: 100% (33007/33007), 9.02 MiB | 16.21 MiB/s, done.
Resolving deltas: 100% (25927/25927), done.
Switched to a new branch 'tag3.0.2'
/path/to/ModSecurity/test/benchmark
Done.
$ cat basic_rules.conf
Include "../../modsecurity.conf-recommended"
Include "owasp-v3/crs-setup.conf.example"
Include "owasp-v3/rules/*.conf"
```
Now the command will give much higher value.
#### How the benchmark works
The tool is a straightforward wrapper application that utilizes the library. It creates a ModSecurity instance and a RuleSet instance, then runs a loop based on the specified number. Within this loop, it creates a Transaction object to emulate real HTTP transactions.
Each transaction is an HTTP/1.1 GET request with some GET parameters. Common headers are added, followed by the response headers and an XML body. Between phases, the tool checks whether an intervention has occurred. All transactions are created with the same data.
Note that the tool does not call the last phase (logging).
Please remember to reset `basic_rules.conf` if you want to try with a different ruleset.
## Reporting Issues
If you are facing a configuration issue or something is not working as you
expected to be, please use the ModSecurity user’s mailing list. Issues on GitHub
are also welcomed, but we prefer to have user ask questions on the mailing list first so that you can reach an entire community. Also don’t forget to look for existing issues before open a new one.
If you are going to open a new issue on GitHub, don’t forget to tell us the
version of your libmodsecurity and the version of a specific connector if there
is one.
### Security issue
Please do not make public any security issue. Contact us at:
modsecurity@owasp.org reporting the issue. Once the problem is fixed your
credit will be given.
## Feature request
We are open to discussing any new feature request with the community via the mailing lists. You can alternativly,
feel free to open GitHub issues requesting new features. Before opening a
new issue, please check if there is one already opened on the same topic.
## Bindings
The libModSecurity design allows the integration with bindings. There is an effort to avoid breaking API [binary] compatibility to make an easy integration with possible bindings. Currently, there are a few notable projects maintained by the community:
* Python - https://github.com/actions-security/pymodsecurity
* Rust - https://github.com/rkrishn7/rust-modsecurity
* Varnish - https://github.com/xdecock/vmod-modsecurity
## Packaging
Having our packages in distros on time is a desire that we have, so let us know
if there is anything we can do to facilitate your work as a packager.
## Sponsor Note
Development of ModSecurity is sponsored by Trustwave. Sponsorship will end July 1, 2024. Additional information can be found here https://www.trustwave.com/en-us/resources/security-resources/software-updates/end-of-sale-and-trustwave-support-for-modsecurity-web-application-firewall/
================================================
FILE: SECURITY.md
================================================
# Security Policy
## Supported Versions
The latest versions of both v2.9.x and v3.0.x are supported.
## Reporting a Vulnerability
For information on how to report a security issue, please see https://github.com/owasp-modsecurity/ModSecurity#security-issue
================================================
FILE: build/.empty
================================================
================================================
FILE: build/ax_cxx_compile_stdcxx.m4
================================================
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
#
# DESCRIPTION
#
# Check for baseline language coverage in the compiler for the specified
# version of the C++ standard. If necessary, add switches to CXX and
# CXXCPP to enable support. VERSION may be '11', '14', '17', or '20' for
# the respective C++ standard version.
#
# The second argument, if specified, indicates whether you insist on an
# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
# -std=c++11). If neither is specified, you get whatever works, with
# preference for no added switch, and then for an extended mode.
#
# The third argument, if specified 'mandatory' or if left unspecified,
# indicates that baseline support for the specified C++ standard is
# required and that the macro should error out if no mode with that
# support is found. If specified 'optional', then configuration proceeds
# regardless, after defining HAVE_CXX${VERSION} if and only if a
# supporting mode is found.
#
# LICENSE
#
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
# Copyright (c) 2016, 2018 Krzesimir Nowak <qdlacz@gmail.com>
# Copyright (c) 2019 Enji Cooper <yaneurabeya@gmail.com>
# Copyright (c) 2020 Jason Merrill <jason@redhat.com>
# Copyright (c) 2021 Jörn Heusipp <osmanx@problemloesungsmaschine.de>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 18
dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
dnl (serial version number 13).
AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
[$1], [14], [ax_cxx_compile_alternatives="14 1y"],
[$1], [17], [ax_cxx_compile_alternatives="17 1z"],
[$1], [20], [ax_cxx_compile_alternatives="20"],
[m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
m4_if([$2], [], [],
[$2], [ext], [],
[$2], [noext], [],
[m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl
m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true],
[$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
[$3], [optional], [ax_cxx_compile_cxx$1_required=false],
[m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
AC_LANG_PUSH([C++])dnl
ac_success=no
m4_if([$2], [], [dnl
AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
ax_cv_cxx_compile_cxx$1,
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
[ax_cv_cxx_compile_cxx$1=yes],
[ax_cv_cxx_compile_cxx$1=no])])
if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
ac_success=yes
fi])
m4_if([$2], [noext], [], [dnl
if test x$ac_success = xno; then
for alternative in ${ax_cxx_compile_alternatives}; do
switch="-std=gnu++${alternative}"
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
$cachevar,
[ac_save_CXX="$CXX"
CXX="$CXX $switch"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
[eval $cachevar=yes],
[eval $cachevar=no])
CXX="$ac_save_CXX"])
if eval test x\$$cachevar = xyes; then
CXX="$CXX $switch"
if test -n "$CXXCPP" ; then
CXXCPP="$CXXCPP $switch"
fi
ac_success=yes
break
fi
done
fi])
m4_if([$2], [ext], [], [dnl
if test x$ac_success = xno; then
dnl HP's aCC needs +std=c++11 according to:
dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
dnl Cray's crayCC needs "-h std=c++11"
dnl MSVC needs -std:c++NN for C++17 and later (default is C++14)
for alternative in ${ax_cxx_compile_alternatives}; do
for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}" MSVC; do
if test x"$switch" = xMSVC; then
dnl AS_TR_SH maps both `:` and `=` to `_` so -std:c++17 would collide
dnl with -std=c++17. We suffix the cache variable name with _MSVC to
dnl avoid this.
switch=-std:c++${alternative}
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_${switch}_MSVC])
else
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
fi
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
$cachevar,
[ac_save_CXX="$CXX"
CXX="$CXX $switch"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
[eval $cachevar=yes],
[eval $cachevar=no])
CXX="$ac_save_CXX"])
if eval test x\$$cachevar = xyes; then
CXX="$CXX $switch"
if test -n "$CXXCPP" ; then
CXXCPP="$CXXCPP $switch"
fi
ac_success=yes
break
fi
done
if test x$ac_success = xyes; then
break
fi
done
fi])
AC_LANG_POP([C++])
if test x$ax_cxx_compile_cxx$1_required = xtrue; then
if test x$ac_success = xno; then
AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
fi
fi
if test x$ac_success = xno; then
HAVE_CXX$1=0
AC_MSG_NOTICE([No compiler with C++$1 support was found])
else
HAVE_CXX$1=1
AC_DEFINE(HAVE_CXX$1,1,
[define if the compiler supports basic C++$1 syntax])
fi
AC_SUBST(HAVE_CXX$1)
])
dnl Test body for checking C++11 support
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
)
dnl Test body for checking C++14 support
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
)
dnl Test body for checking C++17 support
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
_AX_CXX_COMPILE_STDCXX_testbody_new_in_17
)
dnl Test body for checking C++20 support
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_20],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
_AX_CXX_COMPILE_STDCXX_testbody_new_in_17
_AX_CXX_COMPILE_STDCXX_testbody_new_in_20
)
dnl Tests for new features in C++11
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
// If the compiler admits that it is not ready for C++11, why torture it?
// Hopefully, this will speed up the test.
#ifndef __cplusplus
#error "This is not a C++ compiler"
// MSVC always sets __cplusplus to 199711L in older versions; newer versions
// only set it correctly if /Zc:__cplusplus is specified as well as a
// /std:c++NN switch:
// https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
#elif __cplusplus < 201103L && !defined _MSC_VER
#error "This is not a C++11 compiler"
#else
namespace cxx11
{
namespace test_static_assert
{
template <typename T>
struct check
{
static_assert(sizeof(int) <= sizeof(T), "not big enough");
};
}
namespace test_final_override
{
struct Base
{
virtual ~Base() {}
virtual void f() {}
};
struct Derived : public Base
{
virtual ~Derived() override {}
virtual void f() override {}
};
}
namespace test_double_right_angle_brackets
{
template < typename T >
struct check {};
typedef check<void> single_type;
typedef check<check<void>> double_type;
typedef check<check<check<void>>> triple_type;
typedef check<check<check<check<void>>>> quadruple_type;
}
namespace test_decltype
{
int
f()
{
int a = 1;
decltype(a) b = 2;
return a + b;
}
}
namespace test_type_deduction
{
template < typename T1, typename T2 >
struct is_same
{
static const bool value = false;
};
template < typename T >
struct is_same<T, T>
{
static const bool value = true;
};
template < typename T1, typename T2 >
auto
add(T1 a1, T2 a2) -> decltype(a1 + a2)
{
return a1 + a2;
}
int
test(const int c, volatile int v)
{
static_assert(is_same<int, decltype(0)>::value == true, "");
static_assert(is_same<int, decltype(c)>::value == false, "");
static_assert(is_same<int, decltype(v)>::value == false, "");
auto ac = c;
auto av = v;
auto sumi = ac + av + 'x';
auto sumf = ac + av + 1.0;
static_assert(is_same<int, decltype(ac)>::value == true, "");
static_assert(is_same<int, decltype(av)>::value == true, "");
static_assert(is_same<int, decltype(sumi)>::value == true, "");
static_assert(is_same<int, decltype(sumf)>::value == false, "");
static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
return (sumf > 0.0) ? sumi : add(c, v);
}
}
namespace test_noexcept
{
int f() { return 0; }
int g() noexcept { return 0; }
static_assert(noexcept(f()) == false, "");
static_assert(noexcept(g()) == true, "");
}
namespace test_constexpr
{
template < typename CharT >
unsigned long constexpr
strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
{
return *s ? strlen_c_r(s + 1, acc + 1) : acc;
}
template < typename CharT >
unsigned long constexpr
strlen_c(const CharT *const s) noexcept
{
return strlen_c_r(s, 0UL);
}
static_assert(strlen_c("") == 0UL, "");
static_assert(strlen_c("1") == 1UL, "");
static_assert(strlen_c("example") == 7UL, "");
static_assert(strlen_c("another\0example") == 7UL, "");
}
namespace test_rvalue_references
{
template < int N >
struct answer
{
static constexpr int value = N;
};
answer<1> f(int&) { return answer<1>(); }
answer<2> f(const int&) { return answer<2>(); }
answer<3> f(int&&) { return answer<3>(); }
void
test()
{
int i = 0;
const int c = 0;
static_assert(decltype(f(i))::value == 1, "");
static_assert(decltype(f(c))::value == 2, "");
static_assert(decltype(f(0))::value == 3, "");
}
}
namespace test_uniform_initialization
{
struct test
{
static const int zero {};
static const int one {1};
};
static_assert(test::zero == 0, "");
static_assert(test::one == 1, "");
}
namespace test_lambdas
{
void
test1()
{
auto lambda1 = [](){};
auto lambda2 = lambda1;
lambda1();
lambda2();
}
int
test2()
{
auto a = [](int i, int j){ return i + j; }(1, 2);
auto b = []() -> int { return '0'; }();
auto c = [=](){ return a + b; }();
auto d = [&](){ return c; }();
auto e = [a, &b](int x) mutable {
const auto identity = [](int y){ return y; };
for (auto i = 0; i < a; ++i)
a += b--;
return x + identity(a + b);
}(0);
return a + b + c + d + e;
}
int
test3()
{
const auto nullary = [](){ return 0; };
const auto unary = [](int x){ return x; };
using nullary_t = decltype(nullary);
using unary_t = decltype(unary);
const auto higher1st = [](nullary_t f){ return f(); };
const auto higher2nd = [unary](nullary_t f1){
return [unary, f1](unary_t f2){ return f2(unary(f1())); };
};
return higher1st(nullary) + higher2nd(nullary)(unary);
}
}
namespace test_variadic_templates
{
template <int...>
struct sum;
template <int N0, int... N1toN>
struct sum<N0, N1toN...>
{
static constexpr auto value = N0 + sum<N1toN...>::value;
};
template <>
struct sum<>
{
static constexpr auto value = 0;
};
static_assert(sum<>::value == 0, "");
static_assert(sum<1>::value == 1, "");
static_assert(sum<23>::value == 23, "");
static_assert(sum<1, 2>::value == 3, "");
static_assert(sum<5, 5, 11>::value == 21, "");
static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
}
// http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
// Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
// because of this.
namespace test_template_alias_sfinae
{
struct foo {};
template<typename T>
using member = typename T::member_type;
template<typename T>
void func(...) {}
template<typename T>
void func(member<T>*) {}
void test();
void test() { func<foo>(0); }
}
} // namespace cxx11
#endif // __cplusplus >= 201103L
]])
dnl Tests for new features in C++14
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
// If the compiler admits that it is not ready for C++14, why torture it?
// Hopefully, this will speed up the test.
#ifndef __cplusplus
#error "This is not a C++ compiler"
#elif __cplusplus < 201402L && !defined _MSC_VER
#error "This is not a C++14 compiler"
#else
namespace cxx14
{
namespace test_polymorphic_lambdas
{
int
test()
{
const auto lambda = [](auto&&... args){
const auto istiny = [](auto x){
return (sizeof(x) == 1UL) ? 1 : 0;
};
const int aretiny[] = { istiny(args)... };
return aretiny[0];
};
return lambda(1, 1L, 1.0f, '1');
}
}
namespace test_binary_literals
{
constexpr auto ivii = 0b0000000000101010;
static_assert(ivii == 42, "wrong value");
}
namespace test_generalized_constexpr
{
template < typename CharT >
constexpr unsigned long
strlen_c(const CharT *const s) noexcept
{
auto length = 0UL;
for (auto p = s; *p; ++p)
++length;
return length;
}
static_assert(strlen_c("") == 0UL, "");
static_assert(strlen_c("x") == 1UL, "");
static_assert(strlen_c("test") == 4UL, "");
static_assert(strlen_c("another\0test") == 7UL, "");
}
namespace test_lambda_init_capture
{
int
test()
{
auto x = 0;
const auto lambda1 = [a = x](int b){ return a + b; };
const auto lambda2 = [a = lambda1(x)](){ return a; };
return lambda2();
}
}
namespace test_digit_separators
{
constexpr auto ten_million = 100'000'000;
static_assert(ten_million == 100000000, "");
}
namespace test_return_type_deduction
{
auto f(int& x) { return x; }
decltype(auto) g(int& x) { return x; }
template < typename T1, typename T2 >
struct is_same
{
static constexpr auto value = false;
};
template < typename T >
struct is_same<T, T>
{
static constexpr auto value = true;
};
int
test()
{
auto x = 0;
static_assert(is_same<int, decltype(f(x))>::value, "");
static_assert(is_same<int&, decltype(g(x))>::value, "");
return x;
}
}
} // namespace cxx14
#endif // __cplusplus >= 201402L
]])
dnl Tests for new features in C++17
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
// If the compiler admits that it is not ready for C++17, why torture it?
// Hopefully, this will speed up the test.
#ifndef __cplusplus
#error "This is not a C++ compiler"
#elif __cplusplus < 201703L && !defined _MSC_VER
#error "This is not a C++17 compiler"
#else
#include <initializer_list>
#include <utility>
#include <type_traits>
namespace cxx17
{
namespace test_constexpr_lambdas
{
constexpr int foo = [](){return 42;}();
}
namespace test::nested_namespace::definitions
{
}
namespace test_fold_expression
{
template<typename... Args>
int multiply(Args... args)
{
return (args * ... * 1);
}
template<typename... Args>
bool all(Args... args)
{
return (args && ...);
}
}
namespace test_extended_static_assert
{
static_assert (true);
}
namespace test_auto_brace_init_list
{
auto foo = {5};
auto bar {5};
static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
static_assert(std::is_same<int, decltype(bar)>::value);
}
namespace test_typename_in_template_template_parameter
{
template<template<typename> typename X> struct D;
}
namespace test_fallthrough_nodiscard_maybe_unused_attributes
{
int f1()
{
return 42;
}
[[nodiscard]] int f2()
{
[[maybe_unused]] auto unused = f1();
switch (f1())
{
case 17:
f1();
[[fallthrough]];
case 42:
f1();
}
return f1();
}
}
namespace test_extended_aggregate_initialization
{
struct base1
{
int b1, b2 = 42;
};
struct base2
{
base2() {
b3 = 42;
}
int b3;
};
struct derived : base1, base2
{
int d;
};
derived d1 {{1, 2}, {}, 4}; // full initialization
derived d2 {{}, {}, 4}; // value-initialized bases
}
namespace test_general_range_based_for_loop
{
struct iter
{
int i;
int& operator* ()
{
return i;
}
const int& operator* () const
{
return i;
}
iter& operator++()
{
++i;
return *this;
}
};
struct sentinel
{
int i;
};
bool operator== (const iter& i, const sentinel& s)
{
return i.i == s.i;
}
bool operator!= (const iter& i, const sentinel& s)
{
return !(i == s);
}
struct range
{
iter begin() const
{
return {0};
}
sentinel end() const
{
return {5};
}
};
void f()
{
range r {};
for (auto i : r)
{
[[maybe_unused]] auto v = i;
}
}
}
namespace test_lambda_capture_asterisk_this_by_value
{
struct t
{
int i;
int foo()
{
return [*this]()
{
return i;
}();
}
};
}
namespace test_enum_class_construction
{
enum class byte : unsigned char
{};
byte foo {42};
}
namespace test_constexpr_if
{
template <bool cond>
int f ()
{
if constexpr(cond)
{
return 13;
}
else
{
return 42;
}
}
}
namespace test_selection_statement_with_initializer
{
int f()
{
return 13;
}
int f2()
{
if (auto i = f(); i > 0)
{
return 3;
}
switch (auto i = f(); i + 4)
{
case 17:
return 2;
default:
return 1;
}
}
}
namespace test_template_argument_deduction_for_class_templates
{
template <typename T1, typename T2>
struct pair
{
pair (T1 p1, T2 p2)
: m1 {p1},
m2 {p2}
{}
T1 m1;
T2 m2;
};
void f()
{
[[maybe_unused]] auto p = pair{13, 42u};
}
}
namespace test_non_type_auto_template_parameters
{
template <auto n>
struct B
{};
B<5> b1;
B<'a'> b2;
}
namespace test_structured_bindings
{
int arr[2] = { 1, 2 };
std::pair<int, int> pr = { 1, 2 };
auto f1() -> int(&)[2]
{
return arr;
}
auto f2() -> std::pair<int, int>&
{
return pr;
}
struct S
{
int x1 : 2;
volatile double y1;
};
S f3()
{
return {};
}
auto [ x1, y1 ] = f1();
auto& [ xr1, yr1 ] = f1();
auto [ x2, y2 ] = f2();
auto& [ xr2, yr2 ] = f2();
const auto [ x3, y3 ] = f3();
}
namespace test_exception_spec_type_system
{
struct Good {};
struct Bad {};
void g1() noexcept;
void g2();
template<typename T>
Bad
f(T*, T*);
template<typename T1, typename T2>
Good
f(T1*, T2*);
static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
}
namespace test_inline_variables
{
template<class T> void f(T)
{}
template<class T> inline T g(T)
{
return T{};
}
template<> inline void f<>(int)
{}
template<> int g<>(int)
{
return 5;
}
}
} // namespace cxx17
#endif // __cplusplus < 201703L && !defined _MSC_VER
]])
dnl Tests for new features in C++20
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_20], [[
#ifndef __cplusplus
#error "This is not a C++ compiler"
#elif __cplusplus < 202002L && !defined _MSC_VER
#error "This is not a C++20 compiler"
#else
#include <version>
namespace cxx20
{
// As C++20 supports feature test macros in the standard, there is no
// immediate need to actually test for feature availability on the
// Autoconf side.
} // namespace cxx20
#endif // __cplusplus < 202002L && !defined _MSC_VER
]])
================================================
FILE: build/ax_prog_doxygen.m4
================================================
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_prog_doxygen.html
# ===========================================================================
#
# SYNOPSIS
#
# DX_INIT_DOXYGEN(PROJECT-NAME, DOXYFILE-PATH, [OUTPUT-DIR])
# DX_DOXYGEN_FEATURE(ON|OFF)
# DX_DOT_FEATURE(ON|OFF)
# DX_HTML_FEATURE(ON|OFF)
# DX_CHM_FEATURE(ON|OFF)
# DX_CHI_FEATURE(ON|OFF)
# DX_MAN_FEATURE(ON|OFF)
# DX_RTF_FEATURE(ON|OFF)
# DX_XML_FEATURE(ON|OFF)
# DX_PDF_FEATURE(ON|OFF)
# DX_PS_FEATURE(ON|OFF)
#
# DESCRIPTION
#
# The DX_*_FEATURE macros control the default setting for the given
# Doxygen feature. Supported features are 'DOXYGEN' itself, 'DOT' for
# generating graphics, 'HTML' for plain HTML, 'CHM' for compressed HTML
# help (for MS users), 'CHI' for generating a seperate .chi file by the
# .chm file, and 'MAN', 'RTF', 'XML', 'PDF' and 'PS' for the appropriate
# output formats. The environment variable DOXYGEN_PAPER_SIZE may be
# specified to override the default 'a4wide' paper size.
#
# By default, HTML, PDF and PS documentation is generated as this seems to
# be the most popular and portable combination. MAN pages created by
# Doxygen are usually problematic, though by picking an appropriate subset
# and doing some massaging they might be better than nothing. CHM and RTF
# are specific for MS (note that you can't generate both HTML and CHM at
# the same time). The XML is rather useless unless you apply specialized
# post-processing to it.
#
# The macros mainly control the default state of the feature. The use can
# override the default by specifying --enable or --disable. The macros
# ensure that contradictory flags are not given (e.g.,
# --enable-doxygen-html and --enable-doxygen-chm,
# --enable-doxygen-anything with --disable-doxygen, etc.) Finally, each
# feature will be automatically disabled (with a warning) if the required
# programs are missing.
#
# Once all the feature defaults have been specified, call DX_INIT_DOXYGEN
# with the following parameters: a one-word name for the project for use
# as a filename base etc., an optional configuration file name (the
# default is 'Doxyfile', the same as Doxygen's default), and an optional
# output directory name (the default is 'doxygen-doc').
#
# Automake Support
#
# The following is a template aminclude.am file for use with Automake.
# Make targets and variables values are controlled by the various
# DX_COND_* conditionals set by autoconf.
#
# The provided targets are:
#
# doxygen-doc: Generate all doxygen documentation.
#
# doxygen-run: Run doxygen, which will generate some of the
# documentation (HTML, CHM, CHI, MAN, RTF, XML)
# but will not do the post processing required
# for the rest of it (PS, PDF, and some MAN).
#
# doxygen-man: Rename some doxygen generated man pages.
#
# doxygen-ps: Generate doxygen PostScript documentation.
#
# doxygen-pdf: Generate doxygen PDF documentation.
#
# Note that by default these are not integrated into the automake targets.
# If doxygen is used to generate man pages, you can achieve this
# integration by setting man3_MANS to the list of man pages generated and
# then adding the dependency:
#
# $(man3_MANS): doxygen-doc
#
# This will cause make to run doxygen and generate all the documentation.
#
# The following variable is intended for use in Makefile.am:
#
# DX_CLEANFILES = everything to clean.
#
# Then add this variable to MOSTLYCLEANFILES.
#
# ----- begin aminclude.am -------------------------------------
#
# ## --------------------------------- ##
# ## Format-independent Doxygen rules. ##
# ## --------------------------------- ##
#
# if DX_COND_doc
#
# ## ------------------------------- ##
# ## Rules specific for HTML output. ##
# ## ------------------------------- ##
#
# if DX_COND_html
#
# DX_CLEAN_HTML = @DX_DOCDIR@/html
#
# endif DX_COND_html
#
# ## ------------------------------ ##
# ## Rules specific for CHM output. ##
# ## ------------------------------ ##
#
# if DX_COND_chm
#
# DX_CLEAN_CHM = @DX_DOCDIR@/chm
#
# if DX_COND_chi
#
# DX_CLEAN_CHI = @DX_DOCDIR@/@PACKAGE@.chi
#
# endif DX_COND_chi
#
# endif DX_COND_chm
#
# ## ------------------------------ ##
# ## Rules specific for MAN output. ##
# ## ------------------------------ ##
#
# if DX_COND_man
#
# DX_CLEAN_MAN = @DX_DOCDIR@/man
#
# endif DX_COND_man
#
# ## ------------------------------ ##
# ## Rules specific for RTF output. ##
# ## ------------------------------ ##
#
# if DX_COND_rtf
#
# DX_CLEAN_RTF = @DX_DOCDIR@/rtf
#
# endif DX_COND_rtf
#
# ## ------------------------------ ##
# ## Rules specific for XML output. ##
# ## ------------------------------ ##
#
# if DX_COND_xml
#
# DX_CLEAN_XML = @DX_DOCDIR@/xml
#
# endif DX_COND_xml
#
# ## ----------------------------- ##
# ## Rules specific for PS output. ##
# ## ----------------------------- ##
#
# if DX_COND_ps
#
# DX_CLEAN_PS = @DX_DOCDIR@/@PACKAGE@.ps
#
# DX_PS_GOAL = doxygen-ps
#
# doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps
#
# @DX_DOCDIR@/@PACKAGE@.ps: @DX_DOCDIR@/@PACKAGE@.tag
# cd @DX_DOCDIR@/latex; \
# rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \
# $(DX_LATEX) refman.tex; \
# $(MAKEINDEX_PATH) refman.idx; \
# $(DX_LATEX) refman.tex; \
# countdown=5; \
# while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \
# refman.log > /dev/null 2>&1 \
# && test $$countdown -gt 0; do \
# $(DX_LATEX) refman.tex; \
# countdown=`expr $$countdown - 1`; \
# done; \
# $(DX_DVIPS) -o ../@PACKAGE@.ps refman.dvi
#
# endif DX_COND_ps
#
# ## ------------------------------ ##
# ## Rules specific for PDF output. ##
# ## ------------------------------ ##
#
# if DX_COND_pdf
#
# DX_CLEAN_PDF = @DX_DOCDIR@/@PACKAGE@.pdf
#
# DX_PDF_GOAL = doxygen-pdf
#
# doxygen-pdf: @DX_DOCDIR@/@PACKAGE@.pdf
#
# @DX_DOCDIR@/@PACKAGE@.pdf: @DX_DOCDIR@/@PACKAGE@.tag
# cd @DX_DOCDIR@/latex; \
# rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \
# $(DX_PDFLATEX) refman.tex; \
# $(DX_MAKEINDEX) refman.idx; \
# $(DX_PDFLATEX) refman.tex; \
# countdown=5; \
# while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \
# refman.log > /dev/null 2>&1 \
# && test $$countdown -gt 0; do \
# $(DX_PDFLATEX) refman.tex; \
# countdown=`expr $$countdown - 1`; \
# done; \
# mv refman.pdf ../@PACKAGE@.pdf
#
# endif DX_COND_pdf
#
# ## ------------------------------------------------- ##
# ## Rules specific for LaTeX (shared for PS and PDF). ##
# ## ------------------------------------------------- ##
#
# if DX_COND_latex
#
# DX_CLEAN_LATEX = @DX_DOCDIR@/latex
#
# endif DX_COND_latex
#
# .PHONY: doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL)
#
# .INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL)
#
# doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag
#
# doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL)
#
# @DX_DOCDIR@/@PACKAGE@.tag: $(DX_CONFIG) $(pkginclude_HEADERS)
# rm -rf @DX_DOCDIR@
# $(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG)
# echo Timestamp >$@
#
# DX_CLEANFILES = \
# @DX_DOCDIR@/@PACKAGE@.tag \
# -r \
# $(DX_CLEAN_HTML) \
# $(DX_CLEAN_CHM) \
# $(DX_CLEAN_CHI) \
# $(DX_CLEAN_MAN) \
# $(DX_CLEAN_RTF) \
# $(DX_CLEAN_XML) \
# $(DX_CLEAN_PS) \
# $(DX_CLEAN_PDF) \
# $(DX_CLEAN_LATEX)
#
# endif DX_COND_doc
#
# ----- end aminclude.am ---------------------------------------
#
# LICENSE
#
# Copyright (c) 2009 Oren Ben-Kiki <oren@ben-kiki.org>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 13
## ----------##
## Defaults. ##
## ----------##
DX_ENV=""
AC_DEFUN([DX_FEATURE_doc], ON)
AC_DEFUN([DX_FEATURE_dot], OFF)
AC_DEFUN([DX_FEATURE_man], OFF)
AC_DEFUN([DX_FEATURE_html], ON)
AC_DEFUN([DX_FEATURE_chm], OFF)
AC_DEFUN([DX_FEATURE_chi], OFF)
AC_DEFUN([DX_FEATURE_rtf], OFF)
AC_DEFUN([DX_FEATURE_xml], OFF)
AC_DEFUN([DX_FEATURE_pdf], ON)
AC_DEFUN([DX_FEATURE_ps], ON)
## --------------- ##
## Private macros. ##
## --------------- ##
# DX_ENV_APPEND(VARIABLE, VALUE)
# ------------------------------
# Append VARIABLE="VALUE" to DX_ENV for invoking doxygen.
AC_DEFUN([DX_ENV_APPEND], [AC_SUBST([DX_ENV], ["$DX_ENV $1='$2'"])])
# DX_DIRNAME_EXPR
# ---------------
# Expand into a shell expression prints the directory part of a path.
AC_DEFUN([DX_DIRNAME_EXPR],
[[expr ".$1" : '\(\.\)[^/]*$' \| "x$1" : 'x\(.*\)/[^/]*$']])
# DX_IF_FEATURE(FEATURE, IF-ON, IF-OFF)
# -------------------------------------
# Expands according to the M4 (static) status of the feature.
AC_DEFUN([DX_IF_FEATURE], [ifelse(DX_FEATURE_$1, ON, [$2], [$3])])
# DX_REQUIRE_PROG(VARIABLE, PROGRAM)
# ----------------------------------
# Require the specified program to be found for the DX_CURRENT_FEATURE to work.
AC_DEFUN([DX_REQUIRE_PROG], [
AC_PATH_TOOL([$1], [$2])
if test "$DX_FLAG_[]DX_CURRENT_FEATURE$$1" = 1; then
AC_MSG_WARN([$2 not found - will not DX_CURRENT_DESCRIPTION])
AC_SUBST(DX_FLAG_[]DX_CURRENT_FEATURE, 0)
fi
])
# DX_TEST_FEATURE(FEATURE)
# ------------------------
# Expand to a shell expression testing whether the feature is active.
AC_DEFUN([DX_TEST_FEATURE], [test "$DX_FLAG_$1" = 1])
# DX_CHECK_DEPEND(REQUIRED_FEATURE, REQUIRED_STATE)
# -------------------------------------------------
# Verify that a required features has the right state before trying to turn on
# the DX_CURRENT_FEATURE.
AC_DEFUN([DX_CHECK_DEPEND], [
test "$DX_FLAG_$1" = "$2" \
|| AC_MSG_ERROR([doxygen-DX_CURRENT_FEATURE ifelse([$2], 1,
requires, contradicts) doxygen-DX_CURRENT_FEATURE])
])
# DX_CLEAR_DEPEND(FEATURE, REQUIRED_FEATURE, REQUIRED_STATE)
# ----------------------------------------------------------
# Turn off the DX_CURRENT_FEATURE if the required feature is off.
AC_DEFUN([DX_CLEAR_DEPEND], [
test "$DX_FLAG_$1" = "$2" || AC_SUBST(DX_FLAG_[]DX_CURRENT_FEATURE, 0)
])
# DX_FEATURE_ARG(FEATURE, DESCRIPTION,
# CHECK_DEPEND, CLEAR_DEPEND,
# REQUIRE, DO-IF-ON, DO-IF-OFF)
# --------------------------------------------
# Parse the command-line option controlling a feature. CHECK_DEPEND is called
# if the user explicitly turns the feature on (and invokes DX_CHECK_DEPEND),
# otherwise CLEAR_DEPEND is called to turn off the default state if a required
# feature is disabled (using DX_CLEAR_DEPEND). REQUIRE performs additional
# requirement tests (DX_REQUIRE_PROG). Finally, an automake flag is set and
# DO-IF-ON or DO-IF-OFF are called according to the final state of the feature.
AC_DEFUN([DX_ARG_ABLE], [
AC_DEFUN([DX_CURRENT_FEATURE], [$1])
AC_DEFUN([DX_CURRENT_DESCRIPTION], [$2])
AC_ARG_ENABLE(doxygen-$1,
[AS_HELP_STRING(DX_IF_FEATURE([$1], [--disable-doxygen-$1],
[--enable-doxygen-$1]),
DX_IF_FEATURE([$1], [don't $2], [$2]))],
[
case "$enableval" in
#(
y|Y|yes|Yes|YES)
AC_SUBST([DX_FLAG_$1], 1)
$3
;; #(
n|N|no|No|NO)
AC_SUBST([DX_FLAG_$1], 0)
;; #(
*)
AC_MSG_ERROR([invalid value '$enableval' given to doxygen-$1])
;;
esac
], [
AC_SUBST([DX_FLAG_$1], [DX_IF_FEATURE([$1], 1, 0)])
$4
])
if DX_TEST_FEATURE([$1]); then
$5
:
fi
AM_CONDITIONAL(DX_COND_$1, DX_TEST_FEATURE([$1]))
if DX_TEST_FEATURE([$1]); then
$6
:
else
$7
:
fi
])
## -------------- ##
## Public macros. ##
## -------------- ##
# DX_XXX_FEATURE(DEFAULT_STATE)
# -----------------------------
AC_DEFUN([DX_DOXYGEN_FEATURE], [AC_DEFUN([DX_FEATURE_doc], [$1])])
AC_DEFUN([DX_DOT_FEATURE], [AC_DEFUN([DX_FEATURE_dot], [$1])])
AC_DEFUN([DX_MAN_FEATURE], [AC_DEFUN([DX_FEATURE_man], [$1])])
AC_DEFUN([DX_HTML_FEATURE], [AC_DEFUN([DX_FEATURE_html], [$1])])
AC_DEFUN([DX_CHM_FEATURE], [AC_DEFUN([DX_FEATURE_chm], [$1])])
AC_DEFUN([DX_CHI_FEATURE], [AC_DEFUN([DX_FEATURE_chi], [$1])])
AC_DEFUN([DX_RTF_FEATURE], [AC_DEFUN([DX_FEATURE_rtf], [$1])])
AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])])
AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])])
AC_DEFUN([DX_PDF_FEATURE], [AC_DEFUN([DX_FEATURE_pdf], [$1])])
AC_DEFUN([DX_PS_FEATURE], [AC_DEFUN([DX_FEATURE_ps], [$1])])
# DX_INIT_DOXYGEN(PROJECT, [CONFIG-FILE], [OUTPUT-DOC-DIR])
# ---------------------------------------------------------
# PROJECT also serves as the base name for the documentation files.
# The default CONFIG-FILE is "Doxyfile" and OUTPUT-DOC-DIR is "doxygen-doc".
AC_DEFUN([DX_INIT_DOXYGEN], [
# Files:
AC_SUBST([DX_PROJECT], [$1])
AC_SUBST([DX_CONFIG], [ifelse([$2], [], Doxyfile, [$2])])
AC_SUBST([DX_DOCDIR], [ifelse([$3], [], doxygen-doc, [$3])])
# Environment variables used inside doxygen.cfg:
DX_ENV_APPEND(SRCDIR, $srcdir)
DX_ENV_APPEND(PROJECT, $DX_PROJECT)
DX_ENV_APPEND(DOCDIR, $DX_DOCDIR)
DX_ENV_APPEND(VERSION, $PACKAGE_VERSION)
# Doxygen itself:
DX_ARG_ABLE(doc, [generate any doxygen documentation],
[],
[],
[DX_REQUIRE_PROG([DX_DOXYGEN], doxygen)
DX_REQUIRE_PROG([DX_PERL], perl)],
[DX_ENV_APPEND(PERL_PATH, $DX_PERL)])
# Dot for graphics:
DX_ARG_ABLE(dot, [generate graphics for doxygen documentation],
[DX_CHECK_DEPEND(doc, 1)],
[DX_CLEAR_DEPEND(doc, 1)],
[DX_REQUIRE_PROG([DX_DOT], dot)],
[DX_ENV_APPEND(HAVE_DOT, YES)
DX_ENV_APPEND(DOT_PATH, [`DX_DIRNAME_EXPR($DX_DOT)`])],
[DX_ENV_APPEND(HAVE_DOT, NO)])
# Man pages generation:
DX_ARG_ABLE(man, [generate doxygen manual pages],
[DX_CHECK_DEPEND(doc, 1)],
[DX_CLEAR_DEPEND(doc, 1)],
[],
[DX_ENV_APPEND(GENERATE_MAN, YES)],
[DX_ENV_APPEND(GENERATE_MAN, NO)])
# RTF file generation:
DX_ARG_ABLE(rtf, [generate doxygen RTF documentation],
[DX_CHECK_DEPEND(doc, 1)],
[DX_CLEAR_DEPEND(doc, 1)],
[],
[DX_ENV_APPEND(GENERATE_RTF, YES)],
[DX_ENV_APPEND(GENERATE_RTF, NO)])
# XML file generation:
DX_ARG_ABLE(xml, [generate doxygen XML documentation],
[DX_CHECK_DEPEND(doc, 1)],
[DX_CLEAR_DEPEND(doc, 1)],
[],
[DX_ENV_APPEND(GENERATE_XML, YES)],
[DX_ENV_APPEND(GENERATE_XML, NO)])
# (Compressed) HTML help generation:
DX_ARG_ABLE(chm, [generate doxygen compressed HTML help documentation],
[DX_CHECK_DEPEND(doc, 1)],
[DX_CLEAR_DEPEND(doc, 1)],
[DX_REQUIRE_PROG([DX_HHC], hhc)],
[DX_ENV_APPEND(HHC_PATH, $DX_HHC)
DX_ENV_APPEND(GENERATE_HTML, YES)
DX_ENV_APPEND(GENERATE_HTMLHELP, YES)],
[DX_ENV_APPEND(GENERATE_HTMLHELP, NO)])
# Seperate CHI file generation.
DX_ARG_ABLE(chi, [generate doxygen seperate compressed HTML help index file],
[DX_CHECK_DEPEND(chm, 1)],
[DX_CLEAR_DEPEND(chm, 1)],
[],
[DX_ENV_APPEND(GENERATE_CHI, YES)],
[DX_ENV_APPEND(GENERATE_CHI, NO)])
# Plain HTML pages generation:
DX_ARG_ABLE(html, [generate doxygen plain HTML documentation],
[DX_CHECK_DEPEND(doc, 1) DX_CHECK_DEPEND(chm, 0)],
[DX_CLEAR_DEPEND(doc, 1) DX_CLEAR_DEPEND(chm, 0)],
[],
[DX_ENV_APPEND(GENERATE_HTML, YES)],
[DX_TEST_FEATURE(chm) || DX_ENV_APPEND(GENERATE_HTML, NO)])
# PostScript file generation:
DX_ARG_ABLE(ps, [generate doxygen PostScript documentation],
[DX_CHECK_DEPEND(doc, 1)],
[DX_CLEAR_DEPEND(doc, 1)],
[DX_REQUIRE_PROG([DX_LATEX], latex)
DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex)
DX_REQUIRE_PROG([DX_DVIPS], dvips)
DX_REQUIRE_PROG([DX_EGREP], egrep)])
# PDF file generation:
DX_ARG_ABLE(pdf, [generate doxygen PDF documentation],
[DX_CHECK_DEPEND(doc, 1)],
[DX_CLEAR_DEPEND(doc, 1)],
[DX_REQUIRE_PROG([DX_PDFLATEX], pdflatex)
DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex)
DX_REQUIRE_PROG([DX_EGREP], egrep)])
# LaTeX generation for PS and/or PDF:
AM_CONDITIONAL(DX_COND_latex, DX_TEST_FEATURE(ps) || DX_TEST_FEATURE(pdf))
if DX_TEST_FEATURE(ps) || DX_TEST_FEATURE(pdf); then
DX_ENV_APPEND(GENERATE_LATEX, YES)
else
DX_ENV_APPEND(GENERATE_LATEX, NO)
fi
# Paper size for PS and/or PDF:
AC_ARG_VAR(DOXYGEN_PAPER_SIZE,
[a4wide (default), a4, letter, legal or executive])
case "$DOXYGEN_PAPER_SIZE" in
#(
"")
AC_SUBST(DOXYGEN_PAPER_SIZE, "")
;; #(
a4wide|a4|letter|legal|executive)
DX_ENV_APPEND(PAPER_SIZE, $DOXYGEN_PAPER_SIZE)
;; #(
*)
AC_MSG_ERROR([unknown DOXYGEN_PAPER_SIZE='$DOXYGEN_PAPER_SIZE'])
;;
esac
#For debugging:
#echo DX_FLAG_doc=$DX_FLAG_doc
#echo DX_FLAG_dot=$DX_FLAG_dot
#echo DX_FLAG_man=$DX_FLAG_man
#echo DX_FLAG_html=$DX_FLAG_html
#echo DX_FLAG_chm=$DX_FLAG_chm
#echo DX_FLAG_chi=$DX_FLAG_chi
#echo DX_FLAG_rtf=$DX_FLAG_rtf
#echo DX_FLAG_xml=$DX_FLAG_xml
#echo DX_FLAG_pdf=$DX_FLAG_pdf
#echo DX_FLAG_ps=$DX_FLAG_ps
#echo DX_ENV=$DX_ENV
])
================================================
FILE: build/ax_valgrind_check.m4
================================================
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_valgrind_check.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_VALGRIND_DFLT(memcheck|helgrind|drd|sgcheck, on|off)
# AX_VALGRIND_CHECK()
#
# DESCRIPTION
#
# AX_VALGRIND_CHECK checks whether Valgrind is present and, if so, allows
# running `make check` under a variety of Valgrind tools to check for
# memory and threading errors.
#
# Defines VALGRIND_CHECK_RULES which should be substituted in your
# Makefile; and $enable_valgrind which can be used in subsequent configure
# output. VALGRIND_ENABLED is defined and substituted, and corresponds to
# the value of the --enable-valgrind option, which defaults to being
# enabled if Valgrind is installed and disabled otherwise. Individual
# Valgrind tools can be disabled via --disable-valgrind-<tool>, the
# default is configurable via the AX_VALGRIND_DFLT command or is to use
# all commands not disabled via AX_VALGRIND_DFLT. All AX_VALGRIND_DFLT
# calls must be made before the call to AX_VALGRIND_CHECK.
#
# If unit tests are written using a shell script and automake's
# LOG_COMPILER system, the $(VALGRIND) variable can be used within the
# shell scripts to enable Valgrind, as described here:
#
# https://www.gnu.org/software/gnulib/manual/html_node/Running-self_002dtests-under-valgrind.html
#
# Usage example:
#
# configure.ac:
#
# AX_VALGRIND_DFLT([sgcheck], [off])
# AX_VALGRIND_CHECK
#
# Makefile.am:
#
# @VALGRIND_CHECK_RULES@
# VALGRIND_SUPPRESSIONS_FILES = my-project.supp
# EXTRA_DIST = my-project.supp
#
# This results in a "check-valgrind" rule being added to any Makefile.am
# which includes "@VALGRIND_CHECK_RULES@" (assuming the module has been
# configured with --enable-valgrind). Running `make check-valgrind` in
# that directory will run the module's test suite (`make check`) once for
# each of the available Valgrind tools (out of memcheck, helgrind and drd)
# while the sgcheck will be skipped unless enabled again on the
# commandline with --enable-valgrind-sgcheck. The results for each check
# will be output to test-suite-$toolname.log. The target will succeed if
# there are zero errors and fail otherwise.
#
# Alternatively, a "check-valgrind-$TOOL" rule will be added, for $TOOL in
# memcheck, helgrind, drd and sgcheck. These are useful because often only
# some of those tools can be ran cleanly on a codebase.
#
# The macro supports running with and without libtool.
#
# LICENSE
#
# Copyright (c) 2014, 2015, 2016 Philip Withnall <philip.withnall@collabora.co.uk>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 13
dnl Configured tools
m4_define([valgrind_tool_list], [[memcheck], [helgrind], [drd], [sgcheck]])
m4_set_add_all([valgrind_exp_tool_set], [sgcheck])
m4_foreach([vgtool], [valgrind_tool_list],
[m4_define([en_dflt_valgrind_]vgtool, [on])])
AC_DEFUN([AX_VALGRIND_DFLT],[
m4_define([en_dflt_valgrind_$1], [$2])
])dnl
AC_DEFUN([AX_VALGRIND_CHECK],[
dnl Check for --enable-valgrind
AC_ARG_ENABLE([valgrind],
[AS_HELP_STRING([--enable-valgrind], [Whether to enable Valgrind on the unit tests])],
[enable_valgrind=$enableval],[enable_valgrind=])
AS_IF([test "$enable_valgrind" != "no"],[
# Check for Valgrind.
AC_CHECK_PROG([VALGRIND],[valgrind],[valgrind])
AS_IF([test "$VALGRIND" = ""],[
AS_IF([test "$enable_valgrind" = "yes"],[
AC_MSG_ERROR([Could not find valgrind; either install it or reconfigure with --disable-valgrind])
],[
enable_valgrind=no
])
],[
enable_valgrind=yes
])
])
AM_CONDITIONAL([VALGRIND_ENABLED],[test "$enable_valgrind" = "yes"])
AC_SUBST([VALGRIND_ENABLED],[$enable_valgrind])
# Check for Valgrind tools we care about.
[valgrind_enabled_tools=]
m4_foreach([vgtool],[valgrind_tool_list],[
AC_ARG_ENABLE([valgrind-]vgtool,
m4_if(m4_defn([en_dflt_valgrind_]vgtool),[off],dnl
[AS_HELP_STRING([--enable-valgrind-]vgtool, [Whether to use ]vgtool[ during the Valgrind tests])],dnl
[AS_HELP_STRING([--disable-valgrind-]vgtool, [Whether to skip ]vgtool[ during the Valgrind tests])]),
[enable_valgrind_]vgtool[=$enableval],
[enable_valgrind_]vgtool[=])
AS_IF([test "$enable_valgrind" = "no"],[
enable_valgrind_]vgtool[=no],
[test "$enable_valgrind_]vgtool[" ]dnl
m4_if(m4_defn([en_dflt_valgrind_]vgtool), [off], [= "yes"], [!= "no"]),[
AC_CACHE_CHECK([for Valgrind tool ]vgtool,
[ax_cv_valgrind_tool_]vgtool,[
ax_cv_valgrind_tool_]vgtool[=no
m4_set_contains([valgrind_exp_tool_set],vgtool,
[m4_define([vgtoolx],[exp-]vgtool)],
[m4_define([vgtoolx],vgtool)])
AS_IF([`$VALGRIND --tool=]vgtoolx[ --help >/dev/null 2>&1`],[
ax_cv_valgrind_tool_]vgtool[=yes
])
])
AS_IF([test "$ax_cv_valgrind_tool_]vgtool[" = "no"],[
AS_IF([test "$enable_valgrind_]vgtool[" = "yes"],[
AC_MSG_ERROR([Valgrind does not support ]vgtool[; reconfigure with --disable-valgrind-]vgtool)
],[
enable_valgrind_]vgtool[=no
])
],[
enable_valgrind_]vgtool[=yes
])
])
AS_IF([test "$enable_valgrind_]vgtool[" = "yes"],[
valgrind_enabled_tools="$valgrind_enabled_tools ]m4_bpatsubst(vgtool,[^exp-])["
])
AC_SUBST([ENABLE_VALGRIND_]vgtool,[$enable_valgrind_]vgtool)
])
AC_SUBST([valgrind_tools],["]m4_join([ ], valgrind_tool_list)["])
AC_SUBST([valgrind_enabled_tools],[$valgrind_enabled_tools])
[VALGRIND_CHECK_RULES='
# Valgrind check
#
# Optional:
# - VALGRIND_SUPPRESSIONS_FILES: Space-separated list of Valgrind suppressions
# files to load. (Default: empty)
# - VALGRIND_FLAGS: General flags to pass to all Valgrind tools.
# (Default: --num-callers=30)
# - VALGRIND_$toolname_FLAGS: Flags to pass to Valgrind $toolname (one of:
# memcheck, helgrind, drd, sgcheck). (Default: various)
# Optional variables
VALGRIND_SUPPRESSIONS ?= $(addprefix --suppressions=,$(VALGRIND_SUPPRESSIONS_FILES))
VALGRIND_FLAGS ?= --num-callers=30
VALGRIND_memcheck_FLAGS ?= --leak-check=full --show-reachable=no
VALGRIND_helgrind_FLAGS ?= --history-level=approx
VALGRIND_drd_FLAGS ?=
VALGRIND_sgcheck_FLAGS ?=
# Internal use
valgrind_log_files = $(addprefix test-suite-,$(addsuffix .log,$(valgrind_tools)))
valgrind_memcheck_flags = --tool=memcheck $(VALGRIND_memcheck_FLAGS)
valgrind_helgrind_flags = --tool=helgrind $(VALGRIND_helgrind_FLAGS)
valgrind_drd_flags = --tool=drd $(VALGRIND_drd_FLAGS)
valgrind_sgcheck_flags = --tool=exp-sgcheck $(VALGRIND_sgcheck_FLAGS)
valgrind_quiet = $(valgrind_quiet_$(V))
valgrind_quiet_ = $(valgrind_quiet_$(AM_DEFAULT_VERBOSITY))
valgrind_quiet_0 = --quiet
valgrind_v_use = $(valgrind_v_use_$(V))
valgrind_v_use_ = $(valgrind_v_use_$(AM_DEFAULT_VERBOSITY))
valgrind_v_use_0 = @echo " USE " $(patsubst check-valgrind-%,%,$''@):;
# Support running with and without libtool.
ifneq ($(LIBTOOL),)
valgrind_lt = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=execute
else
valgrind_lt =
endif
# Use recursive makes in order to ignore errors during check
check-valgrind:
ifeq ($(VALGRIND_ENABLED),yes)
-$(A''M_V_at)$(foreach tool,$(valgrind_enabled_tools), \
$(MAKE) $(AM_MAKEFLAGS) -k check-valgrind-$(tool); \
)
else
@echo "Need to reconfigure with --enable-valgrind"
endif
# Valgrind running
VALGRIND_TESTS_ENVIRONMENT = \
$(TESTS_ENVIRONMENT) \
env VALGRIND=$(VALGRIND) \
G_SLICE=always-malloc,debug-blocks \
G_DEBUG=fatal-warnings,fatal-criticals,gc-friendly
VALGRIND_LOG_COMPILER = test/test-suite.sh $(VALGRIND_SUPPRESSIONS) $(VALGRIND_FLAGS)
# $(valgrind_lt) \
# $(VALGRIND) $(VALGRIND_SUPPRESSIONS) --error-exitcode=1 $(VALGRIND_FLAGS)
define valgrind_tool_rule =
check-valgrind-$(1):
ifeq ($$(VALGRIND_ENABLED)-$$(ENABLE_VALGRIND_$(1)),yes-yes)
$$(valgrind_v_use)$$(MAKE) check-TESTS \
TESTS_ENVIRONMENT="$$(VALGRIND_TESTS_ENVIRONMENT)" \
LOG_COMPILER="$$(VALGRIND_LOG_COMPILER)" \
LOG_FLAGS="$$(valgrind_$(1)_flags)" \
TEST_SUITE_LOG=test-suite-$(1).log
else ifeq ($$(VALGRIND_ENABLED),yes)
@echo "Need to reconfigure with --enable-valgrind-$(1)"
else
@echo "Need to reconfigure with --enable-valgrind"
endif
endef
$(foreach tool,$(valgrind_tools),$(eval $(call valgrind_tool_rule,$(tool))))
A''M_DISTCHECK_CONFIGURE_FLAGS ?=
A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-valgrind
MOSTLYCLEANFILES ?=
MOSTLYCLEANFILES += $(valgrind_log_files)
.PHONY: check-valgrind $(add-prefix check-valgrind-,$(valgrind_tools))
']
AC_SUBST([VALGRIND_CHECK_RULES])
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([VALGRIND_CHECK_RULES])])
])
================================================
FILE: build/curl.m4
================================================
dnl Check for CURL Libraries
dnl Sets:
dnl CURL_CFLAGS
dnl CURL_LDADD
dnl CURL_LDFLAGS
dnl CURL_VERSION
dnl CURL_DISPLAY
dnl CURL_FOUND
AC_DEFUN([CHECK_CURL], [
MSC_CHECK_LIB([CURL], [libcurl], [curl/curl.h], [curl], [-DWITH_CURL], [7.15.1])
# Post-processing: TLSv1.2 version check
if test "x${CURL_FOUND}" = "x1" && test -n "${CURL_VERSION}"; then
AC_MSG_CHECKING([if libcurl supports TLSv1.2])
_msc_curl_tlsv2_ver=`echo 7.34.0 | awk -F. '{print (\$ 1 * 1000000) + (\$ 2 * 1000) + \$ 3}'`
_msc_curl_ver=`echo ${CURL_VERSION} | awk -F. '{print (\$ 1 * 1000000) + (\$ 2 * 1000) + \$ 3}'`
if test "${_msc_curl_tlsv2_ver}" -le "${_msc_curl_ver}" 2>/dev/null; then
AC_MSG_RESULT([yes])
CURL_CFLAGS="${CURL_CFLAGS} -DWITH_CURL_SSLVERSION_TLSv1_2"
else
AC_MSG_RESULT([no])
fi
# Check/warn if GnuTLS is used
AC_MSG_CHECKING([if libcurl is linked with gnutls])
_msc_curl_uses_gnutls=`echo ${CURL_LDADD} | grep gnutls | wc -l`
if test "$_msc_curl_uses_gnutls" -ne 0; then
AC_MSG_RESULT([yes])
AC_MSG_NOTICE([NOTE: curl linked with gnutls may be buggy, openssl recommended])
else
AC_MSG_RESULT([no])
fi
fi
]) # AC_DEFUN [CHECK_CURL]
================================================
FILE: build/libgeoip.m4
================================================
dnl Check for GeoIP Libraries
dnl Sets:
dnl GEOIP_CFLAGS
dnl GEOIP_LDADD
dnl GEOIP_LDFLAGS
dnl GEOIP_VERSION
dnl GEOIP_DISPLAY
dnl GEOIP_FOUND
AC_DEFUN([PROG_GEOIP], [
MSC_CHECK_LIB([GEOIP], [geoip2 geoip GeoIP], [GeoIPCity.h], [GeoIP], [-DWITH_GEOIP])
]) # AC_DEFUN [PROG_GEOIP]
================================================
FILE: build/libmaxmind.m4
================================================
dnl Check for MaxMind Libraries
dnl Sets:
dnl MAXMIND_CFLAGS
dnl MAXMIND_LDADD
dnl MAXMIND_LDFLAGS
dnl MAXMIND_VERSION
dnl MAXMIND_DISPLAY
dnl MAXMIND_FOUND
AC_DEFUN([PROG_MAXMIND], [
MSC_CHECK_LIB([MAXMIND], [libmaxminddb], [maxminddb.h], [maxminddb], [-DWITH_MAXMIND])
]) # AC_DEFUN [PROG_MAXMIND]
================================================
FILE: build/libxml.m4
================================================
dnl Check for LIBXML2 Libraries
dnl Sets:
dnl LIBXML2_CFLAGS
dnl LIBXML2_LDADD
dnl LIBXML2_LDFLAGS
dnl LIBXML2_VERSION
dnl LIBXML2_DISPLAY
dnl LIBXML2_FOUND
AC_DEFUN([CHECK_LIBXML2], [
MSC_CHECK_LIB([LIBXML2], [libxml-2.0], [libxml/parser.h], [xml2], [-DWITH_LIBXML2], [2.6.29], [libxml])
]) # AC_DEFUN [CHECK_LIBXML2]
================================================
FILE: build/lmdb.m4
================================================
dnl Check for LMDB Libraries
dnl LMDB is disabled by default; only enabled when --with-lmdb is given.
dnl Sets:
dnl LMDB_CFLAGS
dnl LMDB_LDADD
dnl LMDB_LDFLAGS
dnl LMDB_VERSION
dnl LMDB_DISPLAY
dnl LMDB_FOUND
AC_DEFUN([PROG_LMDB], [
# LMDB is opt-in: auto-detect finds it but we only activate when
# --with-lmdb or --with-lmdb=PATH is given explicitly.
MSC_CHECK_LIB([LMDB], [lmdb], [lmdb.h], [lmdb], [-DWITH_LMDB])
# If LMDB was found by auto-detection (no explicit --with-lmdb) treat it
# as disabled since LMDB is opt-in.
_msc_lmdb_with_val="$with_lmdb"
if test "x${_msc_lmdb_with_val}" = "x" && test "x${LMDB_FOUND}" = "x1"; then
LMDB_FOUND=2
LMDB_CFLAGS=""
LMDB_LDADD=""
LMDB_LDFLAGS=""
LMDB_DISPLAY=""
AC_MSG_NOTICE([LMDB is disabled by default. Use --with-lmdb to enable.])
fi
]) # AC_DEFUN [PROG_LMDB]
================================================
FILE: build/lua.m4
================================================
dnl Check for LUA Libraries
dnl Sets:
dnl LUA_CFLAGS
dnl LUA_LDADD
dnl LUA_LDFLAGS
dnl LUA_DISPLAY
dnl LUA_FOUND
AC_DEFUN([CHECK_LUA], [
MSC_CHECK_LIB([LUA], [lua54 lua5.4 lua-5.4 lua53 lua5.3 lua-5.3 lua52 lua5.2 lua-5.2 lua51 lua5.1 lua-5.1 luajit lua], [lua.h], [lua5.4 lua5.3 lua5.2 lua5.1 luajit-5.1 lua], [-DWITH_LUA])
# Post-processing: detect Lua version and add version-specific defines
if test "x${LUA_FOUND}" = "x1"; then
# Use version already detected by MSC_CHECK_LIB (from pkg-config) if available
if test -n "${LUA_VERSION}" && test "x${LUA_VERSION}" != "xunknown"; then
case ${LUA_VERSION} in
5.1*) LUA_CFLAGS="-DWITH_LUA_5_1 ${LUA_CFLAGS}" ;;
5.2*) LUA_CFLAGS="-DWITH_LUA_5_2 ${LUA_CFLAGS}" ;;
5.3*) LUA_CFLAGS="-DWITH_LUA_5_3 ${LUA_CFLAGS}" ;;
5.4*) LUA_CFLAGS="-DWITH_LUA_5_4 ${LUA_CFLAGS}" ;;
2.0*) LUA_CFLAGS="-DWITH_LUA_5_1 ${LUA_CFLAGS}" ;;
2.1*) LUA_CFLAGS="-DWITH_LUA_5_1 -DWITH_LUA_JIT_2_1 ${LUA_CFLAGS}" ;;
esac
AC_MSG_NOTICE([LUA version: ${LUA_VERSION}])
fi
# If no version detected yet, try compile tests
if test -z "${LUA_VERSION}" || test "x${LUA_VERSION}" = "xunknown"; then
LUA_VERSION=""
_msc_save_CFLAGS=$CFLAGS
CFLAGS="${LUA_CFLAGS} ${CFLAGS}"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <lua.h> ]],
[[ #if (LUA_VERSION_NUM == 504)
return 0;
#else
#error not 5.4
#endif ]])],
[ _msc_lua_ver=504 ], [ _msc_lua_ver="" ])
if test -z "$_msc_lua_ver"; then
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <lua.h> ]],
[[ #if (LUA_VERSION_NUM == 503)
return 0;
#else
#error not 5.3
#endif ]])],
[ _msc_lua_ver=503 ], [ _msc_lua_ver="" ])
fi
if test -z "$_msc_lua_ver"; then
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <lua.h> ]],
[[ #if (LUA_VERSION_NUM == 502)
return 0;
#else
#error not 5.2
#endif ]])],
[ _msc_lua_ver=502 ], [ _msc_lua_ver="" ])
fi
if test -z "$_msc_lua_ver"; then
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <lua.h> ]],
[[ #if (LUA_VERSION_NUM == 501)
return 0;
#else
#error not 5.1
#endif ]])],
[ _msc_lua_ver=501 ], [ _msc_lua_ver="" ])
fi
CFLAGS=$_msc_save_CFLAGS
case $_msc_lua_ver in
501) LUA_CFLAGS="-DWITH_LUA_5_1 ${LUA_CFLAGS}" ;;
502) LUA_CFLAGS="-DWITH_LUA_5_2 ${LUA_CFLAGS}" ;;
503) LUA_CFLAGS="-DWITH_LUA_5_3 ${LUA_CFLAGS}" ;;
504) LUA_CFLAGS="-DWITH_LUA_5_4 ${LUA_CFLAGS}" ;;
esac
if test -n "$_msc_lua_ver"; then
AC_MSG_NOTICE([LUA version from compile test: $_msc_lua_ver])
fi
fi
LUA_DISPLAY="${LUA_LDADD} ${LUA_LDFLAGS}, ${LUA_CFLAGS}"
fi
]) # AC_DEFUN [CHECK_LUA]
================================================
FILE: build/msc_find_lib.m4
================================================
dnl MSC_CHECK_LIB: Generic library detection macro
dnl
dnl MSC_CHECK_LIB(NAME, PKG_NAMES, HEADER, LIB_NAMES, EXTRA_CFLAGS,
dnl [MIN_VERSION], [WITH_NAME])
dnl
dnl Detects a library via pkg-config first, then falls back to manual
dnl file-system scanning. Preserves the --with-LIB=PATH|yes|no interface.
dnl
dnl Sets and AC_SUBSTs:
dnl ${NAME}_CFLAGS, ${NAME}_LDADD, ${NAME}_LDFLAGS,
dnl ${NAME}_VERSION, ${NAME}_DISPLAY, ${NAME}_FOUND (0/1/2)
dnl
dnl NAME - Variable prefix (e.g., YAJL, CURL, LIBXML2)
dnl PKG_NAMES - Space-separated pkg-config names to try
dnl HEADER - Header file to look for (e.g., yajl/yajl_parse.h)
dnl LIB_NAMES - Space-separated library names for -l flags
dnl EXTRA_CFLAGS - Additional CFLAGS when found (e.g., -DWITH_YAJL)
dnl MIN_VERSION - Optional minimum version for pkg-config check
dnl WITH_NAME - Optional --with-X name if different from lowercased NAME
AC_DEFUN([MSC_CHECK_LIB], [
m4_pushdef([_MSC_NAME], [$1])dnl
m4_pushdef([_MSC_PKG_NAMES], [$2])dnl
m4_pushdef([_MSC_HEADER], [$3])dnl
m4_pushdef([_MSC_LIB_NAMES], [$4])dnl
m4_pushdef([_MSC_EXTRA_CFLAGS], [$5])dnl
m4_pushdef([_MSC_MIN_VERSION], [$6])dnl
m4_pushdef([_MSC_WITH_NAME], [m4_default([$7], m4_tolower([$1]))])dnl
m4_pushdef([_MSC_POSSIBLE_PATHS], [/usr/local /usr /opt /opt/local /usr/lib /usr/local/lib /usr/lib64])dnl
m4_pushdef([_MSC_POSSIBLE_EXTENSIONS], [so la sl dll dylib])dnl
# Initialize variables
$1_VERSION=""
$1_CFLAGS=""
$1_LDADD=""
$1_LDFLAGS=""
$1_DISPLAY=""
$1_FOUND=0
_msc_[]m4_tolower($1)[]_mandatory=""
_msc_[]m4_tolower($1)[]_disabled=""
AC_ARG_WITH(
_MSC_WITH_NAME,
[AS_HELP_STRING([--with-]_MSC_WITH_NAME[=PATH],
[Path to ]_MSC_NAME[ prefix. Use 'no' to disable.])])
# Get the value of the --with flag
_msc_with_val="$with_[]m4_translit(_MSC_WITH_NAME, [-], [_])"
if test "x${_msc_with_val}" = "xno"; then
AC_MSG_NOTICE([$1 support disabled via --without-]_MSC_WITH_NAME)
_msc_[]m4_tolower($1)[]_disabled=yes
elif test "x${_msc_with_val}" = "xyes"; then
_msc_[]m4_tolower($1)[]_mandatory=yes
AC_MSG_NOTICE([$1 support marked as mandatory])
# Try pkg-config
_MSC_TRY_PKG_CONFIG([$1], [_MSC_PKG_NAMES], [_MSC_MIN_VERSION])
if test -z "${$1_VERSION}"; then
_MSC_TRY_MANUAL([$1], [_MSC_HEADER], [_MSC_LIB_NAMES])
fi
elif test "x${_msc_with_val}" = "x"; then
# Auto-detect
AC_MSG_NOTICE([Auto-detecting $1...])
_MSC_TRY_PKG_CONFIG([$1], [_MSC_PKG_NAMES], [_MSC_MIN_VERSION])
if test -z "${$1_VERSION}"; then
_MSC_TRY_MANUAL([$1], [_MSC_HEADER], [_MSC_LIB_NAMES])
fi
else
# Specific path provided
_msc_[]m4_tolower($1)[]_mandatory=yes
_MSC_TRY_PKG_CONFIG_AT([$1], [_MSC_PKG_NAMES], [_MSC_MIN_VERSION], [${_msc_with_val}])
if test -z "${$1_VERSION}"; then
_MSC_CHECK_AT([$1], [_MSC_HEADER], [_MSC_LIB_NAMES], [${_msc_with_val}])
fi
fi
# Evaluate results
if test -n "${$1_LDADD}" || test -n "${$1_VERSION}"; then
$1_FOUND=1
AC_MSG_NOTICE([using $1 v${$1_VERSION}])
$1_CFLAGS="_MSC_EXTRA_CFLAGS ${$1_CFLAGS}"
if test -z "${$1_DISPLAY}"; then
$1_DISPLAY="${$1_LDADD}, ${$1_CFLAGS}"
fi
AC_SUBST($1_VERSION)
AC_SUBST($1_LDADD)
AC_SUBST($1_LDFLAGS)
AC_SUBST($1_CFLAGS)
AC_SUBST($1_DISPLAY)
elif test -n "${_msc_[]m4_tolower($1)[]_disabled}"; then
$1_FOUND=2
elif test -n "${_msc_[]m4_tolower($1)[]_mandatory}"; then
AC_MSG_ERROR([$1 was explicitly requested but not found])
else
AC_MSG_NOTICE([$1 library not found])
$1_FOUND=0
fi
AC_SUBST($1_FOUND)
m4_popdef([_MSC_POSSIBLE_EXTENSIONS])dnl
m4_popdef([_MSC_POSSIBLE_PATHS])dnl
m4_popdef([_MSC_WITH_NAME])dnl
m4_popdef([_MSC_MIN_VERSION])dnl
m4_popdef([_MSC_EXTRA_CFLAGS])dnl
m4_popdef([_MSC_LIB_NAMES])dnl
m4_popdef([_MSC_HEADER])dnl
m4_popdef([_MSC_PKG_NAMES])dnl
m4_popdef([_MSC_NAME])dnl
]) # MSC_CHECK_LIB
dnl _MSC_TRY_PKG_CONFIG(NAME, PKG_NAMES, MIN_VERSION)
dnl Try to find the library via pkg-config
AC_DEFUN([_MSC_TRY_PKG_CONFIG], [
if test -n "${PKG_CONFIG}"; then
_msc_pkg_name=""
for _msc_p in $2; do
if test -n "$3"; then
if ${PKG_CONFIG} --exists "${_msc_p} >= $3" 2>/dev/null; then
_msc_pkg_name="${_msc_p}"
break
fi
else
if ${PKG_CONFIG} --exists "${_msc_p}" 2>/dev/null; then
_msc_pkg_name="${_msc_p}"
break
fi
fi
done
if test -n "${_msc_pkg_name}"; then
$1_VERSION="`${PKG_CONFIG} ${_msc_pkg_name} --modversion`"
$1_CFLAGS="`${PKG_CONFIG} ${_msc_pkg_name} --cflags`"
$1_LDADD="`${PKG_CONFIG} ${_msc_pkg_name} --libs-only-l`"
$1_LDFLAGS="`${PKG_CONFIG} ${_msc_pkg_name} --libs-only-L --libs-only-other`"
$1_DISPLAY="${$1_LDADD}, ${$1_CFLAGS}"
AC_MSG_NOTICE([$1 found via pkg-config: ${_msc_pkg_name} v${$1_VERSION}])
fi
fi
]) # _MSC_TRY_PKG_CONFIG
dnl _MSC_TRY_PKG_CONFIG_AT(NAME, PKG_NAMES, MIN_VERSION, PATH)
dnl Try pkg-config with PKG_CONFIG_PATH set to a specific location
AC_DEFUN([_MSC_TRY_PKG_CONFIG_AT], [
if test -n "${PKG_CONFIG}"; then
_msc_save_pkg_config_path="${PKG_CONFIG_PATH}"
PKG_CONFIG_PATH="$4/lib/pkgconfig:$4/lib64/pkgconfig:$4/share/pkgconfig:${PKG_CONFIG_PATH}"
export PKG_CONFIG_PATH
_MSC_TRY_PKG_CONFIG([$1], [$2], [$3])
PKG_CONFIG_PATH="${_msc_save_pkg_config_path}"
export PKG_CONFIG_PATH
fi
]) # _MSC_TRY_PKG_CONFIG_AT
dnl _MSC_TRY_MANUAL(NAME, HEADER, LIB_NAMES)
dnl Try to find the library by scanning common paths
AC_DEFUN([_MSC_TRY_MANUAL], [
for _msc_search_path in /usr/local /usr /opt /opt/local /usr/lib /usr/local/lib /usr/lib64; do
_MSC_CHECK_AT([$1], [$2], [$3], [${_msc_search_path}])
if test -n "${$1_VERSION}"; then
break
fi
# Also check if LDADD was set (version may not always be detected manually)
if test -n "${$1_LDADD}"; then
break
fi
done
]) # _MSC_TRY_MANUAL
dnl _MSC_CHECK_AT(NAME, HEADER, LIB_NAMES, PATH)
dnl Check for a library at a specific path
AC_DEFUN([_MSC_CHECK_AT], [
_msc_check_lib_path=""
_msc_check_lib_name=""
_msc_check_lib_file=""
_msc_check_inc_path=""
# Search for library files
for _msc_ext in so la sl dll dylib; do
for _msc_ln in $3; do
for _msc_try_path in \
"$4/lib${_msc_ln}.${_msc_ext}" \
"$4/lib/lib${_msc_ln}.${_msc_ext}" \
"$4/lib64/lib${_msc_ln}.${_msc_ext}" \
"$4/lib/x86_64-linux-gnu/lib${_msc_ln}.${_msc_ext}" \
"$4/lib/i386-linux-gnu/lib${_msc_ln}.${_msc_ext}"; do
if test -e "${_msc_try_path}"; then
_msc_check_lib_path="`dirname ${_msc_try_path}`"
_msc_check_lib_name="${_msc_ln}"
_msc_check_lib_file="${_msc_try_path}"
break 3
fi
done
done
done
# Search for header file
_msc_header_base="`basename $2`"
_msc_header_dir="`dirname $2`"
if test "${_msc_header_dir}" = "."; then
# Simple header name (e.g., "lmdb.h")
if test -e "$4/include/$2"; then
_msc_check_inc_path="$4/include"
elif test -e "$4/$2"; then
_msc_check_inc_path="$4"
fi
else
# Header with subdirectory (e.g., "yajl/yajl_parse.h")
if test -e "$4/include/$2"; then
_msc_check_inc_path="$4/include"
elif test -e "$4/$2"; then
_msc_check_inc_path="$4"
fi
fi
if test -n "${_msc_check_lib_path}" && test -n "${_msc_check_inc_path}"; then
AC_MSG_NOTICE([$1 headers found at: ${_msc_check_inc_path}])
AC_MSG_NOTICE([$1 library found at: ${_msc_check_lib_file}])
$1_CFLAGS="-I${_msc_check_inc_path}"
$1_LDADD="-l${_msc_check_lib_name}"
$1_LDFLAGS="-L${_msc_check_lib_path}"
$1_DISPLAY="${_msc_check_lib_file}, ${_msc_check_inc_path}"
# Version is unknown from manual detection
if test -z "${$1_VERSION}"; then
$1_VERSION="unknown"
fi
fi
]) # _MSC_CHECK_AT
dnl MSC_STATUS_LIB(DISPLAY_NAME, VAR_PREFIX)
dnl Print a status line for the configure summary
AC_DEFUN([MSC_STATUS_LIB], [
if test "x${$2_FOUND}" = "x0"; then
echo " + $1 ....not found"
fi
if test "x${$2_FOUND}" = "x1"; then
AS_ECHO_N([" + $1 ....found "])
if ! test "x${$2_VERSION}" = "x"; then
echo "v${$2_VERSION}"
else
echo ""
fi
echo " ${$2_DISPLAY}"
fi
if test "x${$2_FOUND}" = "x2"; then
echo " + $1 ....disabled"
fi
]) # MSC_STATUS_LIB
dnl MSC_ARG_ENABLE_BOOL(NAME, HELP_TEXT, DEFAULT, VARIABLE)
dnl Wrapper for boolean AC_ARG_ENABLE options
AC_DEFUN([MSC_ARG_ENABLE_BOOL], [
AC_ARG_ENABLE($1,
[AS_HELP_STRING([--enable-$1],[$2])],
[case "${enableval}" in
yes) $4=true ;;
no) $4=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-$1]) ;;
esac],
[$4=$3])
]) # MSC_ARG_ENABLE_BOOL
================================================
FILE: build/pcre.m4
================================================
dnl Check for PCRE Libraries
dnl Sets:
dnl PCRE_CFLAGS
dnl PCRE_LDADD
dnl PCRE_LDFLAGS
dnl PCRE_VERSION
dnl PCRE_FOUND
PCRE_CONFIG=""
PCRE_VERSION=""
PCRE_CPPFLAGS=""
PCRE_CFLAGS=""
PCRE_LDFLAGS=""
PCRE_LDADD=""
PCRE_LD_PATH=""
AC_DEFUN([CHECK_PCRE], [
MSC_CHECK_LIB([PCRE], [libpcre], [pcre.h], [pcre], [-DWITH_PCRE])
# Post-processing: JIT detection
if test "x${PCRE_FOUND}" = "x1" && test -n "${PCRE_VERSION}"; then
AC_MSG_CHECKING([for PCRE JIT])
_msc_save_CFLAGS=$CFLAGS
_msc_save_LDFLAGS=$LDFLAGS
_msc_save_LIBS=$LIBS
CFLAGS="${PCRE_CFLAGS} ${CFLAGS}"
LDFLAGS="${PCRE_LDADD} ${LDFLAGS}"
LIBS="${PCRE_LDADD} ${LIBS}"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[ #include <pcre.h> ]],
[[ pcre_jit_exec(NULL, NULL, NULL, 0, 0, 0, NULL, 0, NULL); ]])],
[ _msc_pcre_jit_available=yes ],
[:]
)
if test "x$_msc_pcre_jit_available" = "xyes"; then
AC_MSG_RESULT([yes])
PCRE_CFLAGS="${PCRE_CFLAGS} -DPCRE_HAVE_JIT"
else
AC_MSG_RESULT([no])
fi
CFLAGS=$_msc_save_CFLAGS
LDFLAGS=$_msc_save_LDFLAGS
LIBS=$_msc_save_LIBS
fi
AC_SUBST(PCRE_CONFIG)
AC_SUBST(PCRE_CPPFLAGS)
AC_SUBST(PCRE_LD_PATH)
]) # AC_DEFUN [CHECK_PCRE]
================================================
FILE: build/pcre2.m4
================================================
dnl Check for PCRE2 Libraries
dnl PCRE2 is enabled by default (mandatory unless --with-pcre is used).
dnl Sets:
dnl PCRE2_CFLAGS
dnl PCRE2_LDADD
dnl PCRE2_LDFLAGS
dnl PCRE2_VERSION
dnl PCRE2_DISPLAY
dnl PCRE2_FOUND
AC_DEFUN([PROG_PCRE2], [
MSC_CHECK_LIB([PCRE2], [libpcre2-8 pcre2-8 pcre2], [pcre2.h], [pcre2-8], [])
]) # AC_DEFUN [PROG_PCRE2]
================================================
FILE: build/release.sh
================================================
#!/bin/bash
git clean -xfdi
git submodule foreach --recursive git clean -xfdi
VERSION=`git describe --tags`
DIR_NAME="modsecurity-$VERSION"
TAR_NAME="modsecurity-$VERSION.tar.gz"
MY_DIR=${PWD##*/}
./build.sh
cd ..
tar --transform "s/^$MY_DIR/$DIR_NAME/" -cvzf $TAR_NAME --exclude .git $MY_DIR
sha256sum $TAR_NAME > $TAR_NAME.sha256
gpg --detach-sign -a $TAR_NAME
cd -
echo $TAR_NAME ": done."
================================================
FILE: build/ssdeep.m4
================================================
dnl Check for SSDEEP Libraries
dnl Sets:
dnl SSDEEP_CFLAGS
dnl SSDEEP_LDADD
dnl SSDEEP_LDFLAGS
dnl SSDEEP_DISPLAY
dnl SSDEEP_FOUND
AC_DEFUN([CHECK_SSDEEP], [
MSC_CHECK_LIB([SSDEEP], [fuzzy], [fuzzy.h], [fuzzy], [-DWITH_SSDEEP])
]) # AC_DEFUN [CHECK_SSDEEP]
================================================
FILE: build/win32/CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.24)
set(BASE_DIR ${CMAKE_CURRENT_LIST_DIR}/../..)
option(WITH_LMDB "Include LMDB support" OFF)
option(WITH_LUA "Include LUA support" ON)
option(WITH_LIBXML2 "Include LibXML2 support" ON)
option(WITH_MAXMIND "Include MaxMind support" ON)
option(WITH_CURL "Include CURL support" ON)
option(USE_ASAN "Build with Address Sanitizer" OFF)
# common compiler settings
# NOTE: MBEDTLS_CONFIG_FILE is not only required to compile the mbedtls subset in others, but also
# when their headers are included while compiling libModSecurity
add_compile_definitions(WIN32 _CRT_SECURE_NO_WARNINGS MBEDTLS_CONFIG_FILE="mbedtls/mbedtls_config.h")
# set standards conformance preprocessor & compiler to align with cross-compiled codebase
# NOTE: otherwise visual c++'s default compiler/preprocessor behaviour generates C4067 warnings
# (unexpected tokens following preprocessor directive - expected a newline)
add_compile_options(/Zc:preprocessor /permissive-)
if(USE_ASAN)
add_compile_options(/fsanitize=address)
add_link_options(/INFERASANLIBS /INCREMENTAL:no)
endif()
# libinjection
project(libinjection C)
set(LIBINJECTION_DIR ${BASE_DIR}/others/libinjection)
add_library(libinjection STATIC ${LIBINJECTION_DIR}/src/libinjection_sqli.c ${LIBINJECTION_DIR}/src/libinjection_xss.c ${LIBINJECTION_DIR}/src/libinjection_html5.c)
# get libinjection version with git describe
execute_process(
COMMAND git describe
WORKING_DIRECTORY ${LIBINJECTION_DIR}
OUTPUT_VARIABLE LIBINJECTION_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
message("-- Detecting libinjection version - ${LIBINJECTION_VERSION}")
target_compile_definitions(libinjection PRIVATE LIBINJECTION_VERSION="${LIBINJECTION_VERSION}")
# mbedtls (mbedcrypto)
project(mbedcrypto C)
set(MBEDTLS_DIR ${BASE_DIR}/others/mbedtls)
add_library(mbedcrypto STATIC ${MBEDTLS_DIR}/library/base64.c ${MBEDTLS_DIR}/library/sha1.c ${MBEDTLS_DIR}/library/md5.c ${MBEDTLS_DIR}/library/platform_util.c ${MBEDTLS_DIR}/library/constant_time.c)
target_include_directories(mbedcrypto PRIVATE ${MBEDTLS_DIR}/include)
# get mbedtls version with git describe
execute_process(
COMMAND git describe
WORKING_DIRECTORY ${MBEDTLS_DIR}
OUTPUT_VARIABLE MBEDTLS_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
message("-- Detecting Mbed TLS version - ${MBEDTLS_VERSION}")
#
# libModSecurity
#
project(libModSecurity
VERSION
3.0.12
LANGUAGES
CXX
)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED On)
set(CMAKE_CXX_EXTENSIONS Off)
set(PACKAGE_BUGREPORT "security@modsecurity.org")
set(PACKAGE_NAME "modsecurity")
set(PACKAGE_VERSION "${PROJECT_VERSION}")
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
set(PACKAGE_TARNAME "${PACKAGE_NAME}")
set(HAVE_YAJL 1) # should always be one, mandatory dependency
set(HAVE_GEOIP 0) # should always be zero, no conan package available
set(HAVE_SSDEEP 0) # should always be zero, no conan package available
macro(enable_feature flag option)
if(${option})
set(${flag} 1) # ON
else()
set(${flag} 0) # OFF
endif()
endmacro()
enable_feature(HAVE_LMDB ${WITH_LMDB})
enable_feature(HAVE_LUA ${WITH_LUA})
enable_feature(HAVE_LIBXML2 ${WITH_LIBXML2})
enable_feature(HAVE_MAXMIND ${WITH_MAXMIND})
enable_feature(HAVE_CURL ${WITH_CURL})
include(${CMAKE_CURRENT_LIST_DIR}/ConfigureChecks.cmake)
configure_file(config.h.cmake ${BASE_DIR}/src/config.h)
find_package(PCRE2 REQUIRED)
find_package(Poco REQUIRED)
find_package(dirent REQUIRED) # used only by tests (check dirent::dirent refernces)
macro(include_package package flag)
if(${flag})
find_package(${package} REQUIRED)
endif()
endmacro()
include_package(yajl HAVE_YAJL)
include_package(libxml2 HAVE_LIBXML2)
include_package(lua HAVE_LUA)
include_package(CURL HAVE_CURL)
include_package(lmdb HAVE_LMDB)
include_package(maxminddb HAVE_MAXMIND)
# library
#
# NOTE: required to generate libModSecurity's import library (libModSecurity.lib), used by tests to link with shared library
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
file(GLOB_RECURSE libModSecuritySources ${BASE_DIR}/src/*.cc)
add_library(libModSecurity SHARED ${libModSecuritySources})
target_compile_definitions(libModSecurity PRIVATE WITH_PCRE2)
target_include_directories(libModSecurity PRIVATE ${BASE_DIR} ${BASE_DIR}/headers ${BASE_DIR}/others ${MBEDTLS_DIR}/include)
target_link_libraries(libModSecurity PRIVATE pcre2::pcre2 libinjection mbedcrypto Poco::Poco Iphlpapi.lib)
macro(add_package_dependency project compile_definition link_library flag)
if(${flag})
target_compile_definitions(${project} PRIVATE ${compile_definition})
target_link_libraries(${project} PRIVATE ${link_library})
endif()
endmacro()
add_package_dependency(libModSecurity WITH_YAJL yajl::yajl HAVE_YAJL)
add_package_dependency(libModSecurity WITH_LIBXML2 LibXml2::LibXml2 HAVE_LIBXML2)
add_package_dependency(libModSecurity WITH_LUA lua::lua HAVE_LUA)
if(HAVE_LUA)
target_compile_definitions(libModSecurity PRIVATE WITH_LUA_5_4)
endif()
add_package_dependency(libModSecurity MSC_WITH_CURL CURL::libcurl HAVE_CURL)
add_package_dependency(libModSecurity WITH_LMDB lmdb::lmdb HAVE_LMDB)
add_package_dependency(libModSecurity WITH_MAXMIND maxminddb::maxminddb HAVE_MAXMIND)
# tests
#
project(libModSecurityTests)
function(setTestTargetProperties executable)
target_compile_definitions(${executable} PRIVATE WITH_PCRE2)
target_include_directories(${executable} PRIVATE ${BASE_DIR} ${BASE_DIR}/headers)
target_link_libraries(${executable} PRIVATE libModSecurity pcre2::pcre2 dirent::dirent)
add_package_dependency(${executable} WITH_YAJL yajl::yajl HAVE_YAJL)
endfunction()
# unit tests
file(GLOB unitTestSources ${BASE_DIR}/test/unit/*.cc)
add_executable(unit_tests ${unitTestSources} ${BASE_DIR}/test/common/custom_debug_log.cc)
setTestTargetProperties(unit_tests)
target_compile_options(unit_tests PRIVATE /wd4805)
# regression tests
file(GLOB regressionTestsSources ${BASE_DIR}/test/regression/*.cc)
add_executable(regression_tests ${regressionTestsSources} ${BASE_DIR}/test/common/custom_debug_log.cc)
setTestTargetProperties(regression_tests)
macro(add_regression_test_capability compile_definition flag)
if(${flag})
target_compile_definitions(regression_tests PRIVATE ${compile_definition})
endif()
endmacro()
add_regression_test_capability(WITH_LUA HAVE_LUA)
add_regression_test_capability(WITH_CURL HAVE_CURL)
add_regression_test_capability(WITH_LMDB HAVE_LMDB)
add_regression_test_capability(WITH_MAXMIND HAVE_MAXMIND)
enable_testing()
file(READ ${BASE_DIR}/test/test-suite.in TEST_FILES_RAW)
string(REPLACE "\n" ";" TEST_FILES ${TEST_FILES_RAW})
foreach(TEST_FILE ${TEST_FILES})
# ignore comment lines
string(FIND ${TEST_FILE} "#" is_comment)
if(NOT is_comment EQUAL 0)
string(FIND ${TEST_FILE} "TESTS+=" is_valid_prefix)
if(NOT is_valid_prefix EQUAL 0)
message(FATAL_ERROR "Invalid prefix in line: ${TEST_FILE}")
endif()
# remove 'TESTS+=' prefix and 'test/' too because tests are launched
# from that directory
string(SUBSTRING ${TEST_FILE} 12 -1 TEST_FILE)
# test name
get_filename_component(TEST_NAME ${TEST_FILE} NAME_WE)
# determine test runner based on test path prefix
string(FIND ${TEST_FILE} "test-cases/regression/" is_regression_test)
if(is_regression_test EQUAL 0)
set(TEST_RUNNER "regression_tests")
else()
set(TEST_RUNNER "unit_tests")
endif()
add_test(NAME ${TEST_NAME} COMMAND ${TEST_RUNNER} ${TEST_FILE} WORKING_DIRECTORY ${BASE_DIR}/test)
endif()
endforeach()
# benchmark
add_executable(benchmark ${BASE_DIR}/test/benchmark/benchmark.cc)
setTestTargetProperties(benchmark)
# rules_optimization
add_executable(rules_optimization ${BASE_DIR}/test/optimization/optimization.cc)
setTestTargetProperties(rules_optimization)
# examples
#
project(libModSecurityExamples)
function(setExampleTargetProperties executable)
target_include_directories(${executable} PRIVATE ${BASE_DIR} ${BASE_DIR}/headers)
target_link_libraries(${executable} PRIVATE libModSecurity)
endfunction()
# simple_example_using_c
add_executable(simple_example_using_c ${BASE_DIR}/examples/simple_example_using_c/test.c)
setExampleTargetProperties(simple_example_using_c)
# using_bodies_in_chunks
add_executable(using_bodies_in_chunks ${BASE_DIR}/examples/using_bodies_in_chunks/simple_request.cc)
setExampleTargetProperties(using_bodies_in_chunks)
# reading_logs_via_rule_message
add_executable(reading_logs_via_rule_message ${BASE_DIR}/examples/reading_logs_via_rule_message/simple_request.cc)
setExampleTargetProperties(reading_logs_via_rule_message)
# reading_logs_with_offset
add_executable(reading_logs_with_offset ${BASE_DIR}/examples/reading_logs_with_offset/read.cc)
setExampleTargetProperties(reading_logs_with_offset)
# multithread
add_executable(multithread ${BASE_DIR}/examples/multithread/multithread.cc)
setExampleTargetProperties(multithread)
# tools
#
# rules_check
add_executable(rules_check ${BASE_DIR}/tools/rules-check/rules-check.cc)
target_include_directories(rules_check PRIVATE ${BASE_DIR} ${BASE_DIR}/headers)
target_link_libraries(rules_check PRIVATE libModSecurity)
================================================
FILE: build/win32/ConfigureChecks.cmake
================================================
include(CheckIncludeFile)
include(CheckIncludeFiles)
check_include_file("dlfcn.h" HAVE_DLFCN_H)
check_include_file("inttypes.h" HAVE_INTTYPES_H)
check_include_file("stdint.h" HAVE_STDINT_H)
check_include_file("stdio.h" HAVE_STDIO_H)
check_include_file("stdlib.h" HAVE_STDLIB_H)
check_include_file("string" HAVE_STRING)
check_include_file("strings.h" HAVE_STRINGS_H)
check_include_file("string.h" HAVE_STRING_H)
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
check_include_file("sys/utsname.h" HAVE_SYS_UTSNAME_H)
check_include_file("unistd.h" HAVE_UNISTD_H)
#/* Define to 1 if you have the ANSI C header files. */
check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
================================================
FILE: build/win32/README.md
================================================
# libModSecurity Windows build information <!-- omit from toc -->
The Windows build of libModSecurity uses Build Tools for Visual Studio 2022 (for Visual C++ & CMake) and Conan package manager.
## Contents <!-- omit from toc -->
- [Prerequisites](#prerequisites)
- [Build](#build)
- [Optional features](#optional-features)
- [Address Sanitizer](#address-sanitizer)
- [Docker container](#docker-container)
## Prerequisites
* [Build Tools for Visual Studio 2022](https://aka.ms/vs/17/release/vs_buildtools.exe)
* Install *Desktop development with C++* workload, which includes:
* MSVC C++ compiler
* Windows SDK
* CMake
* Address Sanitizer
* [Conan package manager 2.10.2](https://github.com/conan-io/conan/releases/download/2.10.2/conan-2.10.2-windows-x86_64-installer.exe)
* Install and then setup the default Conan profile to use the MSVC C++ compiler:
1. Open a command-prompt and set the MSVC C++ compiler environment by executing: `C:\BuildTools\VC\Auxiliary\Build\vcvars64.bat`
2. Execute: `conan profile detect --force`
* [Git for Windows 2.44.0](https://github.com/git-for-windows/git/releases/download/v2.44.0.windows.1/Git-2.44.0-64-bit.exe)
* To clone the libModSecurity repository.
* NOTE: Make sure to initialize and update submodules (to get `libinjection` and regression tests)
* `git submodule init`
* `git submodule update`
## Build
Install the prerequisites listed in the previous section, checkout libModSecurity and from the directory where it's located execute:
```
vcbuild.bat [build_configuration] [arch] [USE_ASAN]
```
where `[build_configuration]` can be: `Release` (default), `RelWithDebInfo`, `MinSizeRel` or `Debug`, and `[arch]` can be: `x86_64` (default) or `x86`.
Built files will be located in the directory: `build\win32\build\[build_configuration]` and include:
* `libModSecurity.dll`
* Executable files for test projects
* `unit_tests.exe`
* `regression_tests.exe`
* `benchmark.exe`
* `rules_optimization.exe`
* Executable files for examples
* `simple_example_using_c.exe`
* `using_bodies_in_chunks.exe`
* `reading_logs_via_rule_message.exe`
* `reading_logs_with_offset.exe`
* `multithread.exe`
* Executable files for tools
* `rules_check.exe`
NOTE: When building a different configuration, it's recommended to reset:
* the build directory: `build\win32\build`
* previously built conan packages executing the command:
* `conan remove * -c`
### Optional features
By default the following all the following features are enabled by including the associated third-party library through a Conan package:
* libxml2 2.12.6 for XML processing support
* libcurl 8.6.0 to support http requests from rules
* libmaxminddb 1.9.1 to support reading MaxMind DB files.
* LUA 5.4.6 to enable rules to run scripts in this language for extensibility
* lmdb 0.9.31 in-memory database
Each of these can be turned off by updating the associated `HAVE_xxx` variable (setting it to zero) in the beginning of the libModSecurity section of `CMakeLists.txt`.
### Address Sanitizer
[AddressSanitizer](https://github.com/google/sanitizers/wiki/AddressSanitizer) (aka ASan) is a memory error detector for C/C++.
To generate a build with *Address Sanitizer*, add the `USE_ASAN` optional third argument to `vcbuild.bat`. For example:
* `vcbuild.bat Debug x86_64 USE_ASAN`
NOTE: `USE_ASAN` does not work with `Release` & `MinSizeRel` configurations because they do not include debug info (it is only compatible with `Debug` & `RelWithDebInfo` builds).
* References
* [AddressSanitizer | Microsoft Learn](https://learn.microsoft.com/en-us/cpp/sanitizers/asan?view=msvc-170)
* [AddressSanitizer for Windows: x64 and Debug Build Support - C++ Team Blog (microsoft.com)](https://devblogs.microsoft.com/cppblog/asan-for-windows-x64-and-debug-build-support/)
* [AddressSanitizer language, build, and debugging reference | Microsoft Learn](https://learn.microsoft.com/en-us/cpp/sanitizers/asan-building?view=msvc-170)
### Docker container
A `Dockerfile` configuration file is provided in the `docker` subdir that creates a Windows container image which installs the [prerequisites](#prerequisites) and builds libModSecurity and other binaries.
NOTE: Windows containers are supported in Docker Desktop for Windows, using the *Switch to Windows containers...* option on the context menu of the system tray icon.
To build the docker image, execute the following command (from the `build\win32\docker` directory):
* `docker build -t libmodsecurity:latest -m 4GB .`
* Build type, architecture and build with Address Sanitizer can be configured through build arguments (`BUILD_TYPE`, `ARCH` & `USE_ASAN` respectively). For example, to generate a debug build, add the following argument:
* `--build-arg BUILD_TYPE=Debug`
Once the image is generated, the library and associated binaries (tests & examples) are located in the `C:\src\ModSecurity\build\win32\build\[build_type]` directory.
To extract the library (`libModSecurity.dll`) from the image, you can execute the following commands:
* `docker container create --name [container_name] libmodsecurity`
* `docker cp [container_name]:C:\src\ModSecurity\build\win32\build\[build_type]\libModSecurity.dll .`
* NOTE: If you leave out the `libModSecurity.dll` filename out, you can copy all the built binaries (including examples & tests).
Additionally, the image can be used interactively for additional development work by executing:
* `docker run -it libmodsecurity`
================================================
FILE: build/win32/conanfile.txt
================================================
[requires]
yajl/2.1.0
pcre2/10.42
libxml2/2.12.6
lua/5.4.6
libcurl/8.6.0
lmdb/0.9.31
libmaxminddb/1.9.1
dirent/1.24
poco/1.13.3
[generators]
CMakeDeps
CMakeToolchain
================================================
FILE: build/win32/config.h.cmake
================================================
/* config.h.cmake. Based upon generated config.h.in. */
#ifndef MODSECURITY_CONFIG_H
#define MODSECURITY_CONFIG_H 1
/* Define to 1 if you have the <dlfcn.h> header file. */
#cmakedefine HAVE_DLFCN_H
/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H
/* Define to 1 if you have the <iostream> header file. */
#cmakedefine HAVE_IOSTREAM
/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H
/* Define to 1 if you have the <stdio.h> header file. */
#cmakedefine HAVE_STDIO_H
/* Define to 1 if you have the <stdlib.h> header file. */
#cmakedefine HAVE_STDLIB_H
/* Define to 1 if you have the <string> header file. */
#cmakedefine HAVE_STRING
/* Define to 1 if you have the <strings.h> header file. */
#cmakedefine HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#cmakedefine HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#cmakedefine HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#cmakedefine HAVE_SYS_TYPES_H
/* Define to 1 if you have the <sys/utsname.h> header file. */
#cmakedefine HAVE_SYS_UTSNAME_H
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H
/* Define if GeoIP is available */
#cmakedefine HAVE_GEOIP
/* Define if LMDB is available */
#cmakedefine HAVE_LMDB
/* Define if LUA is available */
#cmakedefine HAVE_LUA
/* Define if MaxMind is available */
#cmakedefine HAVE_MAXMIND
/* Define if SSDEEP is available */
#cmakedefine HAVE_SSDEEP
/* Define if YAJL is available */
#cmakedefine HAVE_YAJL
/* Define if libcurl is available */
#cmakedefine HAVE_CURL
/* Name of package */
#define PACKAGE "@PACKAGE_NAME@"
/* Define to the address where bug reports for this package should be sent. */
#cmakedefine PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
/* Define to the full name of this package. */
#cmakedefine PACKAGE_NAME "@PACKAGE_NAME@"
/* Define to the full name and version of this package. */
#cmakedefine PACKAGE_STRING "@PACKAGE_STRING@"
/* Define to the one symbol short name of this package. */
#cmakedefine PACKAGE_TARNAME "@PACKAGE_TARNAME@"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#cmakedefine PACKAGE_VERSION "@PACKAGE_VERSION@"
/* Define to 1 if you have the ANSI C header files. */
#ifndef STDC_HEADERS
#cmakedefine STDC_HEADERS
#endif
#endif // ndef MODSECURITY_CONFIG_H
================================================
FILE: build/win32/docker/Dockerfile
================================================
# escape=`
ARG FROM_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2022
FROM ${FROM_IMAGE}
# reset the shell.
SHELL ["cmd", "/S", "/C"]
# set up environment to collect install errors.
COPY InstallBuildTools.cmd C:\TEMP\
ADD https://aka.ms/vscollect.exe C:\TEMP\collect.exe
# download channel for fixed install.
ARG CHANNEL_URL=https://aka.ms/vs/17/release/channel
ADD ${CHANNEL_URL} C:\TEMP\VisualStudio.chman
# download and install Build Tools for Visual Studio 2022 for native desktop workload.
ADD https://aka.ms/vs/17/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe
RUN C:\TEMP\InstallBuildTools.cmd C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache `
--channelUri C:\TEMP\VisualStudio.chman `
--installChannelUri C:\TEMP\VisualStudio.chman `
--add Microsoft.VisualStudio.Workload.VCTools `
--includeRecommended `
--installPath C:\BuildTools
# download & install GIT
ARG GIT_VERSION=2.44.0
ARG GIT_BINARY=Git-${GIT_VERSION}-64-bit.exe
ARG GIT_URL=https://github.com/git-for-windows/git/releases/download/v${GIT_VERSION}.windows.1/${GIT_BINARY}
COPY git.inf C:\TEMP\
ARG INSTALLER=C:\TEMP\${GIT_BINARY}
ADD ${GIT_URL} ${INSTALLER}
RUN %INSTALLER% /SP- /VERYSILENT /SUPPRESSMSGBOXES /NOCANCEL `
/NORESTART /CLOSEAPPLICATIONS /RESTARTAPPLICATIONS /LOADINF=git.inf
# download & setup conan
ARG CONAN_VERSION=2.10.2
ARG CONAN_BINARY=conan-${CONAN_VERSION}-windows-x86_64-installer.exe
ARG CONAN_URL=https://github.com/conan-io/conan/releases/download/${CONAN_VERSION}/${CONAN_BINARY}
ARG INSTALLER=C:\TEMP\${CONAN_BINARY}
ADD ${CONAN_URL} ${INSTALLER}
RUN %INSTALLER% /SP- /VERYSILENT /SUPPRESSMSGBOXES
# setup conan profile
RUN C:\BuildTools\VC\Auxiliary\Build\vcvars64.bat && conan profile detect --force
# download libModSecurity
#
# create src dir
ARG SRC_DIR=C:\src
WORKDIR C:\
RUN cmd.exe /C md %SRC_DIR%
# libModSecurity
WORKDIR ${SRC_DIR}
ARG MOD_SECURITY_TAG=v3/master
RUN git clone -c advice.detachedHead=false --depth 1 --branch %MOD_SECURITY_TAG% https://github.com/owasp-modsecurity/ModSecurity.git
ARG MOD_SECURITY_DIR=${SRC_DIR}\ModSecurity
WORKDIR ${MOD_SECURITY_DIR}
# fetch submodules (bindings/python, others/libinjection, test/test-cases/secrules-language-tests)
RUN git submodule init
RUN git submodule update
# build libraries
#
ARG BUILD_TYPE=Release
ARG ARCH=x86_64
ARG USE_ASAN=
RUN C:\BuildTools\VC\Auxiliary\Build\vcvars64.bat && vcbuild.bat %BUILD_TYPE% %ARCH% %USE_ASAN%
# test suite
#
# setup test environment
RUN cmd.exe /C md \tmp
RUN cmd.exe /C md \bin
RUN cmd.exe /C copy "C:\Program Files\GIT\usr\bin" \bin > NUL
RUN cmd.exe /C copy "C:\Program Files\GIT\usr\bin\echo.exe" \bin\echo > NUL
# disable tests that don't work on windows
ARG JQ_VERSION=1.7.1
ARG JQ_BINARY=jq-windows-amd64.exe
ARG JQ_URL=https://github.com/jqlang/jq/releases/download/jq-${JQ_VERSION}/${JQ_BINARY}
ARG JQ_BIN=C:\TEMP\jq.exe
ADD ${JQ_URL} ${JQ_BIN}
WORKDIR ${MOD_SECURITY_DIR}\test\test-cases\regression
RUN %JQ_BIN% "map(if .title == \"Test match variable (1/n)\" then .enabled = 0 else . end)" issue-2423-msg-in-chain.json > tmp.json && move /Y tmp.json issue-2423-msg-in-chain.json
RUN %JQ_BIN% "map(if .title == \"Test match variable (2/n)\" then .enabled = 0 else . end)" issue-2423-msg-in-chain.json > tmp.json && move /Y tmp.json issue-2423-msg-in-chain.json
RUN %JQ_BIN% "map(if .title == \"Test match variable (3/n)\" then .enabled = 0 else . end)" issue-2423-msg-in-chain.json > tmp.json && move /Y tmp.json issue-2423-msg-in-chain.json
RUN %JQ_BIN% "map(if .title == \"Variable offset - FILES_NAMES\" then .enabled = 0 else . end)" offset-variable.json > tmp.json && move /Y tmp.json offset-variable.json
# run tests
WORKDIR ${MOD_SECURITY_DIR}\build\win32\build
RUN C:\BuildTools\VC\Auxiliary\Build\vcvars64.bat && ctest -C %BUILD_TYPE% --output-on-failure
# setup container's entrypoint
#
WORKDIR C:\
# Use developer command prompt and start PowerShell if no other command specified.
ENTRYPOINT ["C:\\BuildTools\\VC\\Auxiliary\\Build\\vcvars64.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]
================================================
FILE: build/win32/docker/InstallBuildTools.cmd
================================================
@rem Copyright (C) Microsoft Corporation. All rights reserved.
@rem Licensed under the MIT license. See LICENSE.txt in the project root for license information.
@if not defined _echo echo off
setlocal enabledelayedexpansion
call %*
if "%ERRORLEVEL%"=="3010" (
exit /b 0
) else (
if not "%ERRORLEVEL%"=="0" (
set ERR=%ERRORLEVEL%
call C:\TEMP\collect.exe -zip:C:\vslogs.zip
exit /b !ERR!
)
)
================================================
FILE: build/win32/docker/git.inf
================================================
[Setup]
Lang=default
Dir=C:\Program Files\Git
Group=Git
NoIcons=0
SetupType=default
Components=ext,ext\shellhere,ext\guihere,gitlfs,assoc,autoupdate
Tasks=
EditorOption=VIM
CustomEditorPath=
PathOption=Cmd
SSHOption=OpenSSH
TortoiseOption=false
CURLOption=WinSSL
CRLFOption=LFOnly
BashTerminalOption=ConHost
PerformanceTweaksFSCache=Enabled
UseCredentialManager=Enabled
EnableSymlinks=Disabled
EnableBuiltinInteractiveAdd=Disabled
================================================
FILE: build/yajl.m4
================================================
dnl Check for YAJL Libraries
dnl Sets:
dnl YAJL_CFLAGS
dnl YAJL_LDADD
dnl YAJL_LDFLAGS
dnl YAJL_VERSION
dnl YAJL_DISPLAY
dnl YAJL_FOUND
AC_DEFUN([PROG_YAJL], [
MSC_CHECK_LIB([YAJL], [yajl2 yajl], [yajl/yajl_parse.h], [yajl], [-DWITH_YAJL])
# FIX: if the include directory in CFLAGS ends with "include/yajl",
# remove the suffix "/yajl". The library header files are included
# using the prefix (e.g., #include <yajl/yajl_tree.h>), and
# this is even the case for the library itself (e.g.,
# yajl_tree.h includes yajl/yajl_common.h).
_msc_yajl_new_cflags=""
for _msc_yajl_flag in $YAJL_CFLAGS; do
case "$_msc_yajl_flag" in
-I*/include/yajl)
_msc_yajl_new_flag="${_msc_yajl_flag%/yajl}"
_msc_yajl_new_cflags="$_msc_yajl_new_cflags $_msc_yajl_new_flag"
;;
*)
_msc_yajl_new_cflags="$_msc_yajl_new_cflags $_msc_yajl_flag"
;;
esac
done
YAJL_CFLAGS="$_msc_yajl_new_cflags"
YAJL_DISPLAY="${YAJL_LDADD}, ${YAJL_CFLAGS}"
]) # AC_DEFUN [PROG_YAJL]
================================================
FILE: build.sh
================================================
#!/bin/sh
rm -rf autom4te.cache
rm -f aclocal.m4
cd src
rm -f headers.mk
echo "noinst_HEADERS = \\" > headers.mk
ls -1 \
actions/*.h \
actions/ctl/*.h \
actions/data/*.h \
actions/disruptive/*.h \
actions/transformations/*.h \
debug_log/*.h \
audit_log/writer/*.h \
collection/backend/*.h \
operators/*.h \
parser/*.h \
request_body_processor/*.h \
utils/*.h \
variables/*.h \
engine/*.h \
*.h | tr "\012" " " >> headers.mk
cd ../
case `uname` in Darwin*) glibtoolize --force --copy ;;
*) libtoolize --force --copy ;; esac
autoreconf --install
autoheader
automake --add-missing --foreign --copy --force-missing
autoconf --force
rm -rf autom4te.cache
================================================
FILE: configure.ac
================================================
# ModSecurity configure.ac
AC_PREREQ([2.69])
# Get the hash of the last commit, to be used if it is not an
# official release.
AC_DEFUN([MSC_GIT_HASH], m4_esyscmd_s(git log -1 --format="%h" --abbrev-commit))
AC_DEFUN([MSC_MAJOR], m4_esyscmd_s(cat headers/modsecurity/modsecurity.h | grep "define MODSECURITY_MAJOR " | awk {'print $3'} | sed 's/\"//g'))
AC_DEFUN([MSC_MINOR], m4_esyscmd_s(cat headers/modsecurity/modsecurity.h | grep "define MODSECURITY_MINOR " | awk {'print $3'} | sed 's/\"//g'))
AC_DEFUN([MSC_PATCHLEVEL], m4_esyscmd_s(cat headers/modsecurity/modsecurity.h | grep "define MODSECURITY_PATCHLEVEL " | awk {'print $3'} | sed 's/\"//g'))
AC_DEFUN([MSC_TAG], m4_esyscmd_s(cat headers/modsecurity/modsecurity.h | grep "define MODSECURITY_FTAG " | awk {'print $3'} | sed 's/\"//g'))
# Version definition to be further used by AC_INIT and
# .so file naming.
m4_define([msc_version_major], [MSC_MAJOR])
m4_define([msc_version_minor], [MSC_MINOR])
m4_define([msc_version_patchlevel], [MSC_PATCHLEVEL])
m4_define([msc_version_c_plus_a], [m4_eval(msc_version_major + msc_version_minor)])
m4_define([msc_version],
[msc_version_major.msc_version_minor])
m4_define([msc_version_with_patchlevel],
[msc_version_major.msc_version_minor.msc_version_patchlevel])
m4_define([msc_version_git],
[m4_esyscmd_s(git describe)])
m4_define([msc_version_info],
[msc_version_c_plus_a:msc_version_patchlevel:msc_version_minor])
# Project Information
AC_INIT([modsecurity], [3.0], [security@modsecurity.org])
# General definitions
AC_CONFIG_MACRO_DIR([build])
AC_PREFIX_DEFAULT([/usr/local/modsecurity])
# General automake options.
AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
# Check for dependencies (C++, AR, Lex, Yacc and Make)
AC_PROG_CXX
AM_PROG_AR
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_MKDIR_P
PKG_PROG_PKG_CONFIG
# Set C++ standard version and check if compiler supports it.
AX_CXX_COMPILE_STDCXX(17, noext, mandatory)
# Check for libinjection
if ! test -f "${srcdir}/others/libinjection/src/libinjection_html5.c"; then
AC_MSG_ERROR([\
libInjection was not found within ModSecurity source directory.
libInjection code is available as part of ModSecurity source code in a format
of a git-submodule. git-submodule allow us to specify the correct version of
libInjection and still uses the libInjection repository to download it.
You can download libInjection using git:
$ git submodule update --init --recursive
])
fi
# Libinjection version
AC_DEFUN([LIBINJECTION_VERSION], m4_esyscmd_s(cd "others/libinjection" && git describe && cd ../..))
AC_SUBST([LIBINJECTION_VERSION])
# Check for Mbed TLS
if ! test -f "${srcdir}/others/mbedtls/library/base64.c"; then
AC_MSG_ERROR([\
Mbed TLS was not found within ModSecurity source directory.
Mbed TLS code is available as part of ModSecurity source code in a format
of a git-submodule. git-submodule allow us to specify the correct version of
Mbed TLS and still uses the Mbed TLS repository to download it.
You can download Mbed TLS using git:
$ git submodule update --init --recursive
])
fi
# Mbed TLS version
AC_DEFUN([MBEDTLS_VERSION], m4_esyscmd_s(cd "others/mbedtls" && git describe && cd ../..))
# SecLang test version
AC_DEFUN([SECLANG_TEST_VERSION], m4_esyscmd_s(cd "test/test-cases/secrules-language-tests" && git log -1 --format="%h" --abbrev-commit && cd ../../..))
# Check for yajl
PROG_YAJL
AM_CONDITIONAL([YAJL_VERSION], [test "$YAJL_VERSION" != ""])
# Check for LibGeoIP
PROG_GEOIP
# Check for MaxMind
PROG_MAXMIND
# Check for LMDB
PROG_LMDB
# Check for SSDEEP
CHECK_SSDEEP
# Check for LUA
CHECK_LUA
#
# Check for curl
#
CHECK_CURL
if ! test -z "${CURL_VERSION}"; then
AC_DEFINE([MSC_WITH_CURL], [1], [Define if libcurl is available])
fi
#
# Check for LibXML
#
CHECK_LIBXML2
#
# Check for libpcre only if explicitly requested
#
if test "x${with_pcre}" != "x" && test "x${with_pcre}" != "xno"; then
CHECK_PCRE
else
#
# Check for pcre2
#
PROG_PCRE2
fi
# Checks for header files.
AC_CHECK_HEADERS([string])
AC_CHECK_HEADERS([iostream])
AC_CHECK_HEADERS([sys/utsname.h])
AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h libintl.h malloc.h netdb.h netinet/in.h stdint.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_INT8_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
AC_CHECK_TYPES([ptrdiff_t])
AC_CHECK_TYPES([time_t])
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([alarm clock_gettime gethostname gettimeofday inet_ntoa localtime_r memmove memset mkdir select setenv socket strcasecmp strchr strdup strerror strncasecmp strspn strstr strtol strtoul strtoull uname])
# Initialize libtool
LT_INIT
# Identify platform
AC_CANONICAL_HOST
case $host in
*-*-aix*)
echo "Checking platform... Identified as AIX"
AC_DEFINE([AIX], [1], [Define if the operating system is AIX])
PLATFORM="AIX"
;;
*-*-hpux*)
echo "Checking platform... Identified as HPUX"
AC_DEFINE([HPUX], [1], [Define if the operating system is HPUX])
PLATFORM="HPUX"
;;
*-*-darwin*)
echo "Checking platform... Identified as Macintosh OS X"
AC_DEFINE([MACOSX], [1], [Define if the operating system is Macintosh OSX])
PLATFORM="MacOSX"
;;
*-*-linux* | *-*uclinux*)
echo "Checking platform... Identified as Linux"
AC_DEFINE([LINUX], [1], [Define if the operating system is LINUX])
PLATFORM="Linux"
;;
*-*-solaris*)
echo "Checking platform... Identified as Solaris"
AC_DEFINE([SOLARIS], [1], [Define if the operating system is SOLARIS])
PLATFORM="Solaris"
;;
*-*-freebsd*)
echo "Checking platform... Identified as FreeBSD"
AC_DEFINE([FREEBSD], [1], [Define if the operating system is FREEBSD])
PLATFORM="FreeBSD"
;;
*-*-netbsd*)
echo "Checking platform... Identified as NetBSD"
AC_DEFINE([NETBSD], [1], [Define if the operating system is NETBSD])
PLATFORM="NetBSD"
;;
*-*-openbsd*)
echo "Checking platform... Identified as OpenBSD"
AC_DEFINE([OPENBSD], [1], [Define if the operating system is OPENBSD])
PLATFORM="OpenBSD"
;;
*-*-kfreebsd*)
echo "Checking platform... Identified as kFreeBSD, treating as linux"
AC_DEFINE([FREEBSD], [1], [Define if the operating system is FREEBSD])
PLATFORM="kFreeBSD"
;;
*-*-dragonfly*)
echo "Checking platform... Identified as DragonFlyBSD, treating as linux"
AC_DEFINE([DRAGONFLY], [1], [Define if the operating system is DRAGONFLY])
PLATFORM="DragonFly"
;;
*-*-gnu*.*)
echo "Checking platform... Identified as HURD, treating as linux"
AC_DEFINE([LINUX], [1], [Define if the operating system is LINUX])
PLATFORM="HURD"
;;
*)
echo "Unknown CANONICAL_HOST $host"
exit 1
;;
esac
# Variables to be used inside the Makefile.am files.
MSC_BASE_DIR=`pwd`
AC_SUBST([MSC_BASE_DIR])
MSC_VERSION_INFO=msc_version_info
AC_SUBST([MSC_VERSION_INFO])
MSC_VERSION_WITH_PATCHLEVEL=msc_version_with_patchlevel
AC_SUBST([MSC_VERSION_WITH_PATCHLEVEL])
MSC_VERSION=msc_version
AC_SUBST([MSC_VERSION])
MSC_GIT_VERSION=msc_version_git
AC_SUBST([MSC_GIT_VERSION])
MSC_ARG_ENABLE_BOOL([assertions], [Turn on assertions feature: undefine NDEBUG], [false], [assertions])
MSC_ARG_ENABLE_BOOL([debug-logs], [Turn off the SecDebugLog feature], [true], [debugLogs])
if test "$debugLogs" != "true"; then
MODSEC_NO_LOGS="-DNO_LOGS=1"
AC_SUBST(MODSEC_NO_LOGS)
fi
MSC_ARG_ENABLE_BOOL([afl-fuzz], [Turn on the afl fuzzer compilation utilities], [false], [aflFuzzer])
MSC_ARG_ENABLE_BOOL([examples], [Turn on the examples compilation (default option)], [true], [buildExamples])
MSC_ARG_ENABLE_BOOL([parser-generation], [Enables parser generation during the build], [false], [buildParser])
MSC_ARG_ENABLE_BOOL([mutex-on-pm], [Treat pm operations as critical section], [false], [mutexPm])
if test $buildParser = true; then
AC_PROG_YACC
AC_PROG_LEX(noyywrap)
AC_PATH_PROG([FLEX], [flex])
test "x$FLEX" = "x" && AC_MSG_ERROR([flex is needed to build ModSecurity])
AC_PATH_PROG([BISON], [bison])
test "x$BISON" = "x" && AC_MSG_ERROR([bison is needed to build ModSecurity])
AC_PATH_PROG([YACC_INST], $YACC)
if test ! -f "$srcdir/gram.c"; then
if test -z "$YACC_INST"; then
AC_MSG_ERROR([yacc not found - unable to compile ModSecurity])
fi
fi
fi
# Decide if we want to build the tests or not.
buildTestUtilities=false
if test "x$YAJL_FOUND" = "x1"; then
# Regression tests will not be able to run without the logging support.
# But we still have the unit tests.
# if test "$debugLogs" = "true"; then
buildTestUtilities=true
# fi
fi
AM_CONDITIONAL([TEST_UTILITIES], [test $buildTestUtilities = true])
if test $buildTestUtilities = true; then
if test $debugLogs = true; then
if test -f ./test/test-list.sh; then
TEST_CASES=`./test/test-list.sh`
fi
fi
fi
AM_CONDITIONAL([EXAMPLES], [test $buildExamples = true])
AM_CONDITIONAL([BUILD_PARSER], [test $buildParser = true])
AM_CONDITIONAL([USE_MUTEX_ON_PM], [test $mutexPm = true])
# General link options
if test "$PLATFORM" != "MacOSX" -a "$PLATFORM" != "OpenBSD"; then
GLOBAL_LDADD="-lrt "
fi
if test "$aflFuzzer" == "true"; then
FUZZ_CPPCFLAGS="-fsanitize=address -fsanitize-coverage=4 "
GLOBAL_LDADD="$GLOBAL_LDADD -fsanitize=address "
GLOBAL_CPPFLAGS="$GLOBAL_CPPFLAGS $FUZZ_CPPCFLAGS"
$buildExamples = false
fi
case $assertions in
false) ASSERTIONS_CPPCFLAGS="-DNDEBUG" ;;
true) ASSERTIONS_CPPCFLAGS="-UNDEBUG" ;;
*) AC_MSG_ERROR(bad value ${assertions} for assertions) ;;
esac
GLOBAL_CPPFLAGS="$GLOBAL_CPPFLAGS $ASSERTIONS_CPPCFLAGS"
AC_SUBST(GLOBAL_LDADD)
AC_SUBST(GLOBAL_CPPFLAGS)
AM_CONDITIONAL([AFL_FUZZER], [test $aflFuzzer = true])
GLOBAL_CFLAGS=""
AC_SUBST(GLOBAL_CFLAGS)
# Files to be generated via autotools.
AC_CONFIG_FILES([\
modsecurity.pc \
Makefile \
doc/Makefile \
src/Makefile \
others/Makefile \
tools/Makefile \
tools/rules-check/Makefile
])
AM_COND_IF([TEST_UTILITIES],
[AC_CONFIG_FILES([test/Makefile test/benchmark/Makefile])])
AM_COND_IF([EXAMPLES],
[AC_CONFIG_FILES([ \
examples/Makefile \
examples/simple_example_using_c/Makefile \
examples/multiprocess_c/Makefile \
examples/multithread/Makefile \
examples/reading_logs_with_offset/Makefile \
examples/reading_logs_via_rule_message/Makefile \
examples/using_bodies_in_chunks/Makefile \
])])
AM_COND_IF([AFL_FUZZER],
[AC_CONFIG_FILES([test/fuzzer/Makefile])])
AM_COND_IF([BUILD_PARSER],
[AC_CONFIG_FILES([src/parser/Makefile])])
AC_CONFIG_HEADERS([src/config.h])
# Doxygen support
DX_HTML_FEATURE(ON)
DX_CHM_FEATURE(OFF)
DX_CHI_FEATURE(OFF)
DX_MAN_FEATURE(OFF)
DX_RTF_FEATURE(OFF)
DX_XML_FEATURE(OFF)
DX_PDF_FEATURE(OFF)
DX_PS_FEATURE(OFF)
DX_INIT_DOXYGEN([ModSecurity],[doc/doxygen.cfg])
# make check-valgrind
AX_VALGRIND_DFLT([sgcheck], [off])
AX_VALGRIND_CHECK
# Generate the files.
AC_OUTPUT
# Print a fancy summary
echo " "
echo " "
echo "ModSecurity - ${MSC_GIT_VERSION} for $PLATFORM"
echo " "
echo " Mandatory dependencies"
AS_ECHO_N(" + libInjection ....")
echo LIBINJECTION_VERSION
AS_ECHO_N(" + Mbed TLS ....")
echo MBEDTLS_VERSION
AS_ECHO_N(" + SecLang tests ....")
echo SECLANG_TEST_VERSION
echo " "
echo " Optional dependencies"
## GeoIP - MaxMind (combined display)
if test "x$GEOIP_FOUND" = "x0" && test "x$MAXMIND_FOUND" = "x0"; then
echo " + GeoIP/MaxMind ....not found"
fi
if test "x$GEOIP_FOUND" = "x1" || test "x$MAXMIND_FOUND" = "x1"; then
AS_ECHO_N([" + GeoIP/MaxMind ....found "])
echo ""
if test "x$MAXMIND_FOUND" = "x1"; then
echo " * (MaxMind) v${MAXMIND_VERSION}"
echo " ${MAXMIND_DISPLAY}"
fi
if test "x$GEOIP_FOUND" = "x1"; then
echo " * (GeoIP) v${GEOIP_VERSION}"
echo " ${GEOIP_DISPLAY}"
fi
fi
if test "x$GEOIP_FOUND" = "x2" && test "x$MAXMIND_FOUND" = "x2"; then
echo " + GeoIP/MaxMind ....disabled"
fi
MSC_STATUS_LIB([LibCURL ], [CURL])
MSC_STATUS_LIB([YAJL ], [YAJL])
MSC_STATUS_LIB([LMDB ], [LMDB])
MSC_STATUS_LIB([LibXML2 ], [LIBXML2])
MSC_STATUS_LIB([SSDEEP ], [SSDEEP])
MSC_STATUS_LIB([LUA ], [LUA])
## PCRE (only shown when explicitly requested)
if test "x${with_pcre}" != "x" && test "x${with_pcre}" != "xno"; then
if test -n "${PCRE_VERSION}"; then
echo " + PCRE ....found "
echo " using pcre v${PCRE_VERSION}"
echo " ${PCRE_LDADD}, ${PCRE_CFLAGS}"
else
AC_MSG_NOTICE([*** pcre library not found.])
fi
fi
MSC_STATUS_LIB([PCRE2 ], [PCRE2])
echo " "
echo " Other Options"
if test $buildTestUtilities = true; then
if test $debugLogs = true; then
echo " + Test Utilities ....enabled"
else
echo " + Test Utilities ....partially"
fi
else
echo " + Test Utilities ....disabled"
fi
if test $assertions = true; then
echo " + Assertions ....enabled"
else
echo " + Assertions ....disabled"
fi
if test $debugLogs = true; then
echo " + SecDebugLog ....enabled"
else
echo " + SecDebugLog ....disabled"
fi
if test "$aflFuzzer" = "true"; then
echo " + afl fuzzer ....enabled"
echo " ($FUZZ_CPPCFLAGS)"
else
echo " + afl fuzzer ....disabled"
fi
if test "$buildExamples" = "true"; then
echo " + library examples ....enabled"
else
echo " + library examples ....disabled"
fi
if test "$buildParser" = "true"; then
echo " + Building parser ....enabled"
else
echo " + Building parser ....disabled"
fi
if test "$mutexPm" = "true"; then
echo " + Treating pm operations as critical section ....enabled"
else
echo " + Treating pm operations as critical section ....disabled"
fi
echo " "
if test "$aflFuzzer" = "true"; then
echo "WARNING: afl fuzzer was enabled. Make sure you are using the"
echo " 'afl-clang-fast' as the compiler, otherwise the compilation"
echo " will fail."
echo " "
echo " You can set the compiler using:"
echo " "
echo " $ export CXX=afl-clang-fast++ "
echo " $ export CC=afl-clang-fast "
echo " "
fi
================================================
FILE: doc/.empty
================================================
================================================
FILE: doc/Makefile.am
================================================
ACLOCAL_AMFLAGS = -I build
# Doxygen support
# include $(top_srcdir)/build/ax_prog_doxygen.m4
# distribution of the Doxygen configuration file
EXTRA_DIST = \
doxygen.cfg
MAINTAINERCLEANFILES = \
Makefile.in \
doxygen_sqlite3.db \
html \
latex
================================================
FILE: doc/doxygen.cfg
================================================
# Doxyfile 1.8.8
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.
#
# All text after a double hash (##) is considered a comment and is placed in
# front of the TAG it is preceding.
#
# All text after a single hash (#) is considered a comment and will be ignored.
# The format is:
# TAG = value [value, ...]
# For lists, items can also be appended using:
# TAG += value [value, ...]
# Values that contain spaces should be placed between quotes (\" \").
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
# This tag specifies the encoding used for all characters in the config file
# that follow. The default is UTF-8 which is also the encoding used for all text
# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
# for the list of possible encodings.
# The default value is: UTF-8.
DOXYFILE_ENCODING = UTF-8
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
# double-quotes, unless you are using Doxywizard) that should identify the
# project for which the documentation is generated. This name is used in the
# title of most generated pages and in a few other places.
# The default value is: My Project.
PROJECT_NAME = ModSecurity
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = 3.0.0
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
# quick idea about the purpose of the project. Keep the description short.
PROJECT_BRIEF = "ModSecurity is an open source, cross platform web application firewall (WAF) engine for Apache, IIS and Nginx that is developed by Trustwave's SpiderLabs. It has a robust event-based programming language which provides protection from a range of attacks against web applications and allows for HTTP traffic monitoring, logging and real-time analys…"
# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
# the documentation. The maximum height of the logo should not exceed 55 pixels
# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
# to the output directory.
PROJECT_LOGO = ../doc/ms-doxygen-logo.png
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
OUTPUT_DIRECTORY = ../doc
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
# will distribute the generated files over these directories. Enabling this
# option can be useful when feeding doxygen a huge amount of source files, where
# putting all generated files in the same directory would otherwise causes
# performance problems for the file system.
# The default value is: NO.
CREATE_SUBDIRS = NO
# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
# characters to appear in the names of generated files. If set to NO, non-ASCII
# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
# U+3044.
# The default value is: NO.
ALLOW_UNICODE_NAMES = NO
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
# documentation generated by doxygen is written. Doxygen will use this
# information to generate all constant output in the proper language.
# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
# Esperanto, Farsi (Persian), Finnish, French, German,
gitextract_v37w8tr4/ ├── .editorconfig ├── .github/ │ ├── ISSUE_TEMPLATE/ │ │ ├── bug-report-for-version-2-x.md │ │ └── bug-report-for-version-3-x.md │ ├── PULL_REQUEST_TEMPLATE.md │ └── workflows/ │ ├── ci.yml │ └── ci_new.yml ├── .gitignore ├── .gitmodules ├── AUTHORS ├── CHANGES ├── LICENSE ├── Makefile.am ├── README.md ├── SECURITY.md ├── build/ │ ├── .empty │ ├── ax_cxx_compile_stdcxx.m4 │ ├── ax_prog_doxygen.m4 │ ├── ax_valgrind_check.m4 │ ├── curl.m4 │ ├── libgeoip.m4 │ ├── libmaxmind.m4 │ ├── libxml.m4 │ ├── lmdb.m4 │ ├── lua.m4 │ ├── msc_find_lib.m4 │ ├── pcre.m4 │ ├── pcre2.m4 │ ├── release.sh │ ├── ssdeep.m4 │ ├── win32/ │ │ ├── CMakeLists.txt │ │ ├── ConfigureChecks.cmake │ │ ├── README.md │ │ ├── conanfile.txt │ │ ├── config.h.cmake │ │ └── docker/ │ │ ├── Dockerfile │ │ ├── InstallBuildTools.cmd │ │ └── git.inf │ └── yajl.m4 ├── build.sh ├── configure.ac ├── doc/ │ ├── .empty │ ├── Makefile.am │ └── doxygen.cfg ├── examples/ │ ├── Makefile.am │ ├── multiprocess_c/ │ │ ├── Makefile.am │ │ ├── basic_rules.conf │ │ └── multi.c │ ├── multithread/ │ │ ├── Makefile.am │ │ ├── basic_rules.conf │ │ └── multithread.cc │ ├── reading_logs_via_rule_message/ │ │ ├── Makefile.am │ │ ├── blocked_request.conf │ │ ├── blocked_request_engine_on.conf │ │ ├── match.conf │ │ ├── no_match.conf │ │ ├── reading_logs_via_rule_message.h │ │ └── simple_request.cc │ ├── reading_logs_with_offset/ │ │ ├── Makefile.am │ │ └── read.cc │ ├── simple_example_using_c/ │ │ ├── Makefile.am │ │ ├── basic_rules.conf │ │ ├── test-valgrind.sh │ │ └── test.c │ └── using_bodies_in_chunks/ │ ├── Makefile.am │ ├── example.conf │ └── simple_request.cc ├── headers/ │ └── modsecurity/ │ ├── actions/ │ │ └── action.h │ ├── anchored_set_variable.h │ ├── anchored_set_variable_translation_proxy.h │ ├── anchored_variable.h │ ├── audit_log.h │ ├── collection/ │ │ ├── collection.h │ │ └── collections.h │ ├── debug_log.h │ ├── intervention.h │ ├── modsecurity.h │ ├── rule.h │ ├── rule_marker.h │ ├── rule_message.h │ ├── rule_unconditional.h │ ├── rule_with_actions.h │ ├── rule_with_operator.h │ ├── rules.h │ ├── rules_exceptions.h │ ├── rules_properties.h │ ├── rules_set.h │ ├── rules_set_phases.h │ ├── rules_set_properties.h │ ├── transaction.h │ ├── variable_origin.h │ └── variable_value.h ├── modsecurity.conf-recommended ├── modsecurity.pc.in ├── others/ │ └── Makefile.am ├── src/ │ ├── Makefile.am │ ├── actions/ │ │ ├── accuracy.cc │ │ ├── accuracy.h │ │ ├── action.cc │ │ ├── audit_log.cc │ │ ├── audit_log.h │ │ ├── block.cc │ │ ├── block.h │ │ ├── capture.cc │ │ ├── capture.h │ │ ├── chain.cc │ │ ├── chain.h │ │ ├── ctl/ │ │ │ ├── audit_engine.cc │ │ │ ├── audit_engine.h │ │ │ ├── audit_log_parts.cc │ │ │ ├── audit_log_parts.h │ │ │ ├── parse_xml_into_args.cc │ │ │ ├── parse_xml_into_args.h │ │ │ ├── request_body_access.cc │ │ │ ├── request_body_access.h │ │ │ ├── request_body_processor_json.cc │ │ │ ├── request_body_processor_json.h │ │ │ ├── request_body_processor_urlencoded.cc │ │ │ ├── request_body_processor_urlencoded.h │ │ │ ├── request_body_processor_xml.cc │ │ │ ├── request_body_processor_xml.h │ │ │ ├── rule_engine.cc │ │ │ ├── rule_engine.h │ │ │ ├── rule_remove_by_id.cc │ │ │ ├── rule_remove_by_id.h │ │ │ ├── rule_remove_by_tag.cc │ │ │ ├── rule_remove_by_tag.h │ │ │ ├── rule_remove_target_by_id.cc │ │ │ ├── rule_remove_target_by_id.h │ │ │ ├── rule_remove_target_by_tag.cc │ │ │ └── rule_remove_target_by_tag.h │ │ ├── data/ │ │ │ ├── status.cc │ │ │ └── status.h │ │ ├── disruptive/ │ │ │ ├── allow.cc │ │ │ ├── allow.h │ │ │ ├── deny.cc │ │ │ ├── deny.h │ │ │ ├── drop.cc │ │ │ ├── drop.h │ │ │ ├── pass.cc │ │ │ ├── pass.h │ │ │ ├── redirect.cc │ │ │ └── redirect.h │ │ ├── exec.cc │ │ ├── exec.h │ │ ├── expire_var.cc │ │ ├── expire_var.h │ │ ├── init_col.cc │ │ ├── init_col.h │ │ ├── log.cc │ │ ├── log.h │ │ ├── log_data.cc │ │ ├── log_data.h │ │ ├── maturity.cc │ │ ├── maturity.h │ │ ├── msg.cc │ │ ├── msg.h │ │ ├── multi_match.cc │ │ ├── multi_match.h │ │ ├── no_audit_log.cc │ │ ├── no_audit_log.h │ │ ├── no_log.cc │ │ ├── no_log.h │ │ ├── phase.cc │ │ ├── phase.h │ │ ├── rev.cc │ │ ├── rev.h │ │ ├── rule_id.cc │ │ ├── rule_id.h │ │ ├── set_env.cc │ │ ├── set_env.h │ │ ├── set_rsc.cc │ │ ├── set_rsc.h │ │ ├── set_sid.cc │ │ ├── set_sid.h │ │ ├── set_uid.cc │ │ ├── set_uid.h │ │ ├── set_var.cc │ │ ├── set_var.h │ │ ├── severity.cc │ │ ├── severity.h │ │ ├── skip.cc │ │ ├── skip.h │ │ ├── skip_after.cc │ │ ├── skip_after.h │ │ ├── tag.cc │ │ ├── tag.h │ │ ├── transformations/ │ │ │ ├── base64_decode.cc │ │ │ ├── base64_decode.h │ │ │ ├── base64_decode_ext.cc │ │ │ ├── base64_decode_ext.h │ │ │ ├── base64_encode.cc │ │ │ ├── base64_encode.h │ │ │ ├── cmd_line.cc │ │ │ ├── cmd_line.h │ │ │ ├── compress_whitespace.cc │ │ │ ├── compress_whitespace.h │ │ │ ├── css_decode.cc │ │ │ ├── css_decode.h │ │ │ ├── escape_seq_decode.cc │ │ │ ├── escape_seq_decode.h │ │ │ ├── hex_decode.cc │ │ │ ├── hex_decode.h │ │ │ ├── hex_encode.cc │ │ │ ├── hex_encode.h │ │ │ ├── html_entity_decode.cc │ │ │ ├── html_entity_decode.h │ │ │ ├── js_decode.cc │ │ │ ├── js_decode.h │ │ │ ├── length.cc │ │ │ ├── length.h │ │ │ ├── lower_case.cc │ │ │ ├── lower_case.h │ │ │ ├── md5.cc │ │ │ ├── md5.h │ │ │ ├── none.cc │ │ │ ├── none.h │ │ │ ├── normalise_path.cc │ │ │ ├── normalise_path.h │ │ │ ├── normalise_path_win.cc │ │ │ ├── normalise_path_win.h │ │ │ ├── parity_even_7bit.cc │ │ │ ├── parity_even_7bit.h │ │ │ ├── parity_odd_7bit.cc │ │ │ ├── parity_odd_7bit.h │ │ │ ├── parity_zero_7bit.cc │ │ │ ├── parity_zero_7bit.h │ │ │ ├── remove_comments.cc │ │ │ ├── remove_comments.h │ │ │ ├── remove_comments_char.cc │ │ │ ├── remove_comments_char.h │ │ │ ├── remove_nulls.cc │ │ │ ├── remove_nulls.h │ │ │ ├── remove_whitespace.cc │ │ │ ├── remove_whitespace.h │ │ │ ├── replace_comments.cc │ │ │ ├── replace_comments.h │ │ │ ├── replace_nulls.cc │ │ │ ├── replace_nulls.h │ │ │ ├── sha1.cc │ │ │ ├── sha1.h │ │ │ ├── sql_hex_decode.cc │ │ │ ├── sql_hex_decode.h │ │ │ ├── transformation.cc │ │ │ ├── transformation.h │ │ │ ├── trim.cc │ │ │ ├── trim.h │ │ │ ├── trim_left.cc │ │ │ ├── trim_left.h │ │ │ ├── trim_right.cc │ │ │ ├── trim_right.h │ │ │ ├── upper_case.cc │ │ │ ├── upper_case.h │ │ │ ├── url_decode.cc │ │ │ ├── url_decode.h │ │ │ ├── url_decode_uni.cc │ │ │ ├── url_decode_uni.h │ │ │ ├── url_encode.cc │ │ │ ├── url_encode.h │ │ │ ├── utf8_to_unicode.cc │ │ │ └── utf8_to_unicode.h │ │ ├── ver.cc │ │ ├── ver.h │ │ ├── xmlns.cc │ │ └── xmlns.h │ ├── anchored_set_variable.cc │ ├── anchored_variable.cc │ ├── audit_log/ │ │ ├── audit_log.cc │ │ └── writer/ │ │ ├── https.cc │ │ ├── https.h │ │ ├── parallel.cc │ │ ├── parallel.h │ │ ├── serial.cc │ │ ├── serial.h │ │ ├── writer.cc │ │ └── writer.h │ ├── collection/ │ │ ├── backend/ │ │ │ ├── collection_data.cc │ │ │ ├── collection_data.h │ │ │ ├── in_memory-per_process.cc │ │ │ ├── in_memory-per_process.h │ │ │ ├── lmdb.cc │ │ │ └── lmdb.h │ │ └── collections.cc │ ├── compat/ │ │ └── msvc.h │ ├── debug_log/ │ │ ├── debug_log.cc │ │ ├── debug_log_writer.cc │ │ └── debug_log_writer.h │ ├── debug_log_writer_agent.h │ ├── engine/ │ │ ├── lua.cc │ │ └── lua.h │ ├── modsecurity.cc │ ├── operators/ │ │ ├── .directory │ │ ├── begins_with.cc │ │ ├── begins_with.h │ │ ├── contains.cc │ │ ├── contains.h │ │ ├── contains_word.cc │ │ ├── contains_word.h │ │ ├── detect_sqli.cc │ │ ├── detect_sqli.h │ │ ├── detect_xss.cc │ │ ├── detect_xss.h │ │ ├── ends_with.cc │ │ ├── ends_with.h │ │ ├── eq.cc │ │ ├── eq.h │ │ ├── fuzzy_hash.cc │ │ ├── fuzzy_hash.h │ │ ├── ge.cc │ │ ├── ge.h │ │ ├── geo_lookup.cc │ │ ├── geo_lookup.h │ │ ├── gsblookup.cc │ │ ├── gsblookup.h │ │ ├── gt.cc │ │ ├── gt.h │ │ ├── inspect_file.cc │ │ ├── inspect_file.h │ │ ├── ip_match.cc │ │ ├── ip_match.h │ │ ├── ip_match_f.cc │ │ ├── ip_match_f.h │ │ ├── ip_match_from_file.cc │ │ ├── ip_match_from_file.h │ │ ├── le.cc │ │ ├── le.h │ │ ├── lt.cc │ │ ├── lt.h │ │ ├── no_match.cc │ │ ├── no_match.h │ │ ├── operator.cc │ │ ├── operator.h │ │ ├── pm.cc │ │ ├── pm.h │ │ ├── pm_f.h │ │ ├── pm_from_file.cc │ │ ├── pm_from_file.h │ │ ├── rbl.cc │ │ ├── rbl.h │ │ ├── rsub.cc │ │ ├── rsub.h │ │ ├── rx.cc │ │ ├── rx.h │ │ ├── rx_global.cc │ │ ├── rx_global.h │ │ ├── str_eq.cc │ │ ├── str_eq.h │ │ ├── str_match.cc │ │ ├── str_match.h │ │ ├── unconditional_match.cc │ │ ├── unconditional_match.h │ │ ├── validate_byte_range.cc │ │ ├── validate_byte_range.h │ │ ├── validate_dtd.cc │ │ ├── validate_dtd.h │ │ ├── validate_hash.cc │ │ ├── validate_hash.h │ │ ├── validate_schema.cc │ │ ├── validate_schema.h │ │ ├── validate_url_encoding.cc │ │ ├── validate_url_encoding.h │ │ ├── validate_utf8_encoding.cc │ │ ├── validate_utf8_encoding.h │ │ ├── verify_cc.cc │ │ ├── verify_cc.h │ │ ├── verify_cpf.cc │ │ ├── verify_cpf.h │ │ ├── verify_ssn.cc │ │ ├── verify_ssn.h │ │ ├── verify_svnr.cc │ │ ├── verify_svnr.h │ │ ├── within.cc │ │ └── within.h │ ├── parser/ │ │ ├── Makefile.am │ │ ├── driver.cc │ │ ├── driver.h │ │ ├── location.hh │ │ ├── position.hh │ │ ├── seclang-parser.cc │ │ ├── seclang-parser.hh │ │ ├── seclang-parser.yy │ │ ├── seclang-scanner.cc │ │ ├── seclang-scanner.ll │ │ └── stack.hh │ ├── request_body_processor/ │ │ ├── json.cc │ │ ├── json.h │ │ ├── multipart.cc │ │ ├── multipart.h │ │ ├── xml.cc │ │ └── xml.h │ ├── rule.cc │ ├── rule_message.cc │ ├── rule_script.cc │ ├── rule_script.h │ ├── rule_unconditional.cc │ ├── rule_with_actions.cc │ ├── rule_with_operator.cc │ ├── rules_exceptions.cc │ ├── rules_set.cc │ ├── rules_set_phases.cc │ ├── rules_set_properties.cc │ ├── run_time_string.cc │ ├── run_time_string.h │ ├── transaction.cc │ ├── unique_id.cc │ ├── unique_id.h │ ├── utils/ │ │ ├── acmp.cc │ │ ├── acmp.h │ │ ├── base64.cc │ │ ├── base64.h │ │ ├── decode.cc │ │ ├── decode.h │ │ ├── geo_lookup.cc │ │ ├── geo_lookup.h │ │ ├── https_client.cc │ │ ├── https_client.h │ │ ├── ip_tree.cc │ │ ├── ip_tree.h │ │ ├── md5.h │ │ ├── msc_tree.cc │ │ ├── msc_tree.h │ │ ├── phase.h │ │ ├── random.cc │ │ ├── random.h │ │ ├── regex.cc │ │ ├── regex.h │ │ ├── sha1.h │ │ ├── shared_files.cc │ │ ├── shared_files.h │ │ ├── string.h │ │ ├── system.cc │ │ └── system.h │ └── variables/ │ ├── args.h │ ├── args_combined_size.h │ ├── args_get.h │ ├── args_get_names.h │ ├── args_names.h │ ├── args_post.h │ ├── args_post_names.h │ ├── auth_type.h │ ├── duration.cc │ ├── duration.h │ ├── env.cc │ ├── env.h │ ├── files.h │ ├── files_combined_size.h │ ├── files_names.h │ ├── files_sizes.h │ ├── files_tmp_content.h │ ├── files_tmp_names.h │ ├── full_request.h │ ├── full_request_length.h │ ├── geo.h │ ├── global.h │ ├── highest_severity.cc │ ├── highest_severity.h │ ├── inbound_data_error.h │ ├── ip.h │ ├── matched_var.h │ ├── matched_var_name.h │ ├── matched_vars.h │ ├── matched_vars_names.h │ ├── modsec_build.cc │ ├── modsec_build.h │ ├── msc_pcre_error.h │ ├── msc_pcre_limits_exceeded.h │ ├── multipart_boundary_quoted.h │ ├── multipart_boundary_whitespace.h │ ├── multipart_crlf_lf_lines.h │ ├── multipart_data_after.h │ ├── multipart_data_before.h │ ├── multipart_file_limit_exceeded.h │ ├── multipart_file_name.h │ ├── multipart_header_folding.h │ ├── multipart_invalid_header_folding.h │ ├── multipart_invalid_part.h │ ├── multipart_invalid_quoting.h │ ├── multipart_lf_line.h │ ├── multipart_missing_semicolon.h │ ├── multipart_name.h │ ├── multipart_part_headers.h │ ├── multipart_strict_error.h │ ├── multipart_unmatched_boundary.h │ ├── outbound_data_error.h │ ├── path_info.h │ ├── query_string.h │ ├── remote_addr.h │ ├── remote_host.h │ ├── remote_port.h │ ├── remote_user.cc │ ├── remote_user.h │ ├── reqbody_error.h │ ├── reqbody_error_msg.h │ ├── reqbody_processor.h │ ├── reqbody_processor_error.h │ ├── reqbody_processor_error_msg.h │ ├── request_base_name.h │ ├── request_body.h │ ├── request_body_length.h │ ├── request_cookies.h │ ├── request_cookies_names.h │ ├── request_file_name.h │ ├── request_headers.h │ ├── request_headers_names.h │ ├── request_line.h │ ├── request_method.h │ ├── request_protocol.h │ ├── request_uri.h │ ├── request_uri_raw.h │ ├── resource.h │ ├── response_body.h │ ├── response_content_length.h │ ├── response_content_type.h │ ├── response_headers.h │ ├── response_headers_names.h │ ├── response_protocol.h │ ├── response_status.h │ ├── rule.cc │ ├── rule.h │ ├── server_addr.h │ ├── server_name.h │ ├── server_port.h │ ├── session.h │ ├── session_id.h │ ├── status.h │ ├── time.cc │ ├── time.h │ ├── time_day.cc │ ├── time_day.h │ ├── time_epoch.cc │ ├── time_epoch.h │ ├── time_hour.cc │ ├── time_hour.h │ ├── time_min.cc │ ├── time_min.h │ ├── time_mon.cc │ ├── time_mon.h │ ├── time_sec.cc │ ├── time_sec.h │ ├── time_wday.cc │ ├── time_wday.h │ ├── time_year.cc │ ├── time_year.h │ ├── tx.cc │ ├── tx.h │ ├── unique_id.h │ ├── url_encoded_error.h │ ├── user.h │ ├── user_id.h │ ├── variable.cc │ ├── variable.h │ ├── web_app_id.h │ ├── xml.cc │ └── xml.h ├── test/ │ ├── .empty │ ├── Makefile.am │ ├── benchmark/ │ │ ├── Makefile.am │ │ ├── basic_rules.conf │ │ ├── benchmark.cc │ │ ├── download-owasp-v3-rules.sh │ │ └── download-owasp-v4-rules.sh │ ├── coding_style_suppressions.txt │ ├── common/ │ │ ├── colors.h │ │ ├── custom_debug_log.cc │ │ ├── custom_debug_log.h │ │ ├── modsecurity_test.cc │ │ ├── modsecurity_test.h │ │ ├── modsecurity_test_context.h │ │ └── modsecurity_test_results.h │ ├── cppcheck_suppressions.txt │ ├── custom-test-driver │ ├── fuzzer/ │ │ ├── Makefile.am │ │ └── afl_fuzzer.cc │ ├── modsecurity-regression-ip-list.txt │ ├── modsecurity-regression-rules.txt │ ├── optimization/ │ │ └── optimization.cc │ ├── regression/ │ │ ├── regression.cc │ │ ├── regression_test.cc │ │ └── regression_test.h │ ├── regression-tests-valgrind.sh │ ├── test-cases/ │ │ ├── data/ │ │ │ ├── GeoIP2-City-Test-source.json │ │ │ ├── GeoIP2-City-Test.mmdb │ │ │ ├── SoapEnvelope-bad.dtd │ │ │ ├── SoapEnvelope-bad.xsd │ │ │ ├── SoapEnvelope.dtd │ │ │ ├── SoapEnvelope.xsd │ │ │ ├── SoapEnvelope2.xsd │ │ │ ├── big-file.conf │ │ │ ├── config_example-bad-op-include.txt │ │ │ ├── config_example-ops-include.txt │ │ │ ├── config_example.txt │ │ │ ├── config_example2.txt │ │ │ ├── config_example3.txt │ │ │ ├── geo/ │ │ │ │ └── README.txt │ │ │ ├── inspectFile-abcdef.lua │ │ │ ├── ipMatchFromFile.txt │ │ │ ├── match-getvar-multi-transformations.lua │ │ │ ├── match-getvar-transformation.lua │ │ │ ├── match-getvar-withTnfs.lua │ │ │ ├── match-getvar.lua │ │ │ ├── match-getvars-args.lua │ │ │ ├── match-getvars.lua │ │ │ ├── match-log.lua │ │ │ ├── match-set.lua │ │ │ ├── match.lua │ │ │ ├── not-so-big-file.conf │ │ │ ├── pattern-file1.data │ │ │ ├── pattern-file2.data │ │ │ ├── script.lua │ │ │ ├── setvar.lua │ │ │ ├── ssdeep.txt │ │ │ ├── test.lua │ │ │ └── unicode.mapping-reduced │ │ └── regression/ │ │ ├── action-allow.json │ │ ├── action-block.json │ │ ├── action-ctl_audit_engine.json │ │ ├── action-ctl_request_body_access.json │ │ ├── action-ctl_request_body_processor.json │ │ ├── action-ctl_request_body_processor_urlencoded.json │ │ ├── action-ctl_rule_engine.json │ │ ├── action-ctl_rule_remove_by_id.json │ │ ├── action-ctl_rule_remove_by_tag.json │ │ ├── action-ctl_rule_remove_target_by_id.json │ │ ├── action-ctl_rule_remove_target_by_tag.json │ │ ├── action-disruptive.json │ │ ├── action-exec.json │ │ ├── action-expirevar.json │ │ ├── action-id.json │ │ ├── action-initcol.json │ │ ├── action-msg.json │ │ ├── action-setenv.json │ │ ├── action-setrsc.json │ │ ├── action-setsid.json │ │ ├── action-setuid.json │ │ ├── action-skip.json │ │ ├── action-tag.json │ │ ├── action-tnf-base64.json │ │ ├── action-xmlns.json │ │ ├── actions.json │ │ ├── auditlog.json │ │ ├── collection-case-insensitive.json │ │ ├── collection-lua.json │ │ ├── collection-regular_expression_selection.json │ │ ├── collection-resource.json │ │ ├── collection-tx-with-macro.json │ │ ├── collection-tx.json │ │ ├── config-body_limits.json │ │ ├── config-calling_phases_by_name.json │ │ ├── config-include-bad.json │ │ ├── config-include.json │ │ ├── config-remove_by_id.json │ │ ├── config-remove_by_msg.json │ │ ├── config-remove_by_tag.json │ │ ├── config-response_type.json │ │ ├── config-secdefaultaction.json │ │ ├── config-secremoterules.json │ │ ├── config-update-action-by-id.json │ │ ├── config-update-target-by-id.json │ │ ├── config-update-target-by-msg.json │ │ ├── config-update-target-by-tag.json │ │ ├── config-xml_external_entity.json │ │ ├── debug_log.json │ │ ├── directive-sec_rule_script.json │ │ ├── fn-setHostname.json │ │ ├── issue-1152.json │ │ ├── issue-1528.json │ │ ├── issue-1565.json │ │ ├── issue-1576.json │ │ ├── issue-1591.json │ │ ├── issue-1725.json │ │ ├── issue-1743.json │ │ ├── issue-1785.json │ │ ├── issue-1812.json │ │ ├── issue-1825.json │ │ ├── issue-1831.json │ │ ├── issue-1844.json │ │ ├── issue-1850.json │ │ ├── issue-1941.json │ │ ├── issue-1943.json │ │ ├── issue-1956.json │ │ ├── issue-1960.json │ │ ├── issue-2000.json │ │ ├── issue-2099.json │ │ ├── issue-2111.json │ │ ├── issue-2196.json │ │ ├── issue-2296.json │ │ ├── issue-2423-msg-in-chain.json │ │ ├── issue-2427.json │ │ ├── issue-3340.json │ │ ├── issue-394.json │ │ ├── issue-849.json │ │ ├── issue-960.json │ │ ├── misc-variable-under-quotes.json │ │ ├── misc.json │ │ ├── offset-variable.json │ │ ├── operator-UnconditionalMatch.json │ │ ├── operator-detectsqli.json │ │ ├── operator-detectxss.json │ │ ├── operator-fuzzyhash.json │ │ ├── operator-inpectFile.json │ │ ├── operator-ipMatchFromFile.json │ │ ├── operator-pm.json │ │ ├── operator-pmfromfile.json │ │ ├── operator-rx.json │ │ ├── operator-rxGlobal.json │ │ ├── operator-validate-byte-range.json │ │ ├── operator-verifycc.json │ │ ├── operator-verifycpf.json │ │ ├── operator-verifyssn.json │ │ ├── operator-verifysvnr.json │ │ ├── request-body-parser-json.json │ │ ├── request-body-parser-multipart-crlf.json │ │ ├── request-body-parser-multipart.json │ │ ├── request-body-parser-xml-validade-dtd.json │ │ ├── request-body-parser-xml.json │ │ ├── rule-920120.json │ │ ├── rule-920200.json │ │ ├── rule-920274.json │ │ ├── sec_component_signature.json │ │ ├── secaction.json │ │ ├── secargumentslimit.json │ │ ├── secmarker.json │ │ ├── secruleengine.json │ │ ├── transformation-none.json │ │ ├── transformations.json │ │ ├── variable-ARGS.json │ │ ├── variable-ARGS_COMBINED_SIZE.json │ │ ├── variable-ARGS_GET.json │ │ ├── variable-ARGS_GET_NAMES.json │ │ ├── variable-ARGS_NAMES.json │ │ ├── variable-ARGS_POST.json │ │ ├── variable-ARGS_POST_NAMES.json │ │ ├── variable-AUTH_TYPE.json │ │ ├── variable-DURATION.json │ │ ├── variable-ENV.json │ │ ├── variable-FILES.json │ │ ├── variable-FILES_COMBINED_SIZE.json │ │ ├── variable-FILES_NAMES.json │ │ ├── variable-FILES_SIZES.json │ │ ├── variable-FULL_REQUEST.json │ │ ├── variable-FULL_REQUEST_LENGTH.json │ │ ├── variable-GEO.json │ │ ├── variable-HIGHEST_SEVERITY.json │ │ ├── variable-INBOUND_DATA_ERROR.json │ │ ├── variable-MATCHED_VAR.json │ │ ├── variable-MATCHED_VARS.json │ │ ├── variable-MATCHED_VARS_NAMES.json │ │ ├── variable-MATCHED_VAR_NAME.json │ │ ├── variable-MODSEC_BUILD.json │ │ ├── variable-MULTIPART_CRLF_LF_LINES.json │ │ ├── variable-MULTIPART_FILENAME.json │ │ ├── variable-MULTIPART_INVALID_HEADER_FOLDING.json │ │ ├── variable-MULTIPART_NAME.json │ │ ├── variable-MULTIPART_PART_HEADERS.json │ │ ├── variable-MULTIPART_STRICT_ERROR.json │ │ ├── variable-MULTIPART_UNMATCHED_BOUNDARY.json │ │ ├── variable-OUTBOUND_DATA_ERROR.json │ │ ├── variable-PATH_INFO.json │ │ ├── variable-QUERY_STRING.json │ │ ├── variable-REMOTE_ADDR.json │ │ ├── variable-REMOTE_HOST.json │ │ ├── variable-REMOTE_PORT.json │ │ ├── variable-REMOTE_USER.json │ │ ├── variable-REQBODY_PROCESSOR.json │ │ ├── variable-REQBODY_PROCESSOR_ERROR.json │ │ ├── variable-REQUEST_BASENAME.json │ │ ├── variable-REQUEST_BODY.json │ │ ├── variable-REQUEST_BODY_LENGTH.json │ │ ├── variable-REQUEST_COOKIES.json │ │ ├── variable-REQUEST_COOKIES_NAMES.json │ │ ├── variable-REQUEST_FILENAME.json │ │ ├── variable-REQUEST_HEADERS.json │ │ ├── variable-REQUEST_HEADERS_NAMES.json │ │ ├── variable-REQUEST_LINE.json │ │ ├── variable-REQUEST_METHOD.json │ │ ├── variable-REQUEST_PROTOCOL.json │ │ ├── variable-REQUEST_URI.json │ │ ├── variable-REQUEST_URI_RAW.json │ │ ├── variable-RESPONSE_BODY.json │ │ ├── variable-RESPONSE_CONTENT_LENGTH.json │ │ ├── variable-RESPONSE_CONTENT_TYPE.json │ │ ├── variable-RESPONSE_HEADERS.json │ │ ├── variable-RESPONSE_HEADERS_NAMES.json │ │ ├── variable-RESPONSE_PROTOCOL.json │ │ ├── variable-RULE.json │ │ ├── variable-SERVER_ADDR.json │ │ ├── variable-SERVER_NAME.json │ │ ├── variable-SERVER_PORT.json │ │ ├── variable-SESSIONID.json │ │ ├── variable-STATUS.json │ │ ├── variable-TIME.json │ │ ├── variable-TIME_DAY.json │ │ ├── variable-TIME_EPOCH.json │ │ ├── variable-TIME_HOUR.json │ │ ├── variable-TIME_MIN.json │ │ ├── variable-TIME_MON.json │ │ ├── variable-TIME_SEC.json │ │ ├── variable-TIME_WDAY.json │ │ ├── variable-TIME_YEAR.json │ │ ├── variable-TX.json │ │ ├── variable-UNIQUE_ID.json │ │ ├── variable-URLENCODED_ERROR.json │ │ ├── variable-USERID.json │ │ ├── variable-WEBAPPID.json │ │ ├── variable-WEBSERVER_ERROR_LOG.json │ │ ├── variable-XML.json │ │ ├── variable-variation-count.json │ │ └── variable-variation-exclusion.json │ ├── test-suite.in │ ├── test-suite.sh │ ├── unit/ │ │ ├── unit.cc │ │ ├── unit_test.cc │ │ └── unit_test.h │ ├── unit-tests-valgrind.sh │ └── valgrind_suppressions.txt ├── tools/ │ ├── Makefile.am │ └── rules-check/ │ ├── Makefile.am │ └── rules-check.cc ├── unicode.mapping └── vcbuild.bat
SYMBOL INDEX (1738 symbols across 497 files)
FILE: examples/multiprocess_c/multi.c
function process_special_request (line 41) | static void process_special_request (int j) {
function process_request (line 63) | static void process_request (int j) {
function main (line 100) | int main (int argc, char **argv)
FILE: examples/multithread/multithread.cc
function process_request (line 9) | static void process_request(modsecurity::ModSecurity *modsec, modsecurit...
function main (line 38) | int main (int argc, char *argv[]) {
FILE: examples/reading_logs_via_rule_message/reading_logs_via_rule_message.h
function process_request (line 71) | static void process_request(modsecurity::ModSecurity *modsec, modsecurit...
function class (line 97) | class ReadingLogsViaRuleMessage {
function logCb (line 148) | static void logCb(void *data, const void *ruleMessagev) {
FILE: examples/reading_logs_via_rule_message/simple_request.cc
function main (line 25) | int main(int argc, char **argv) {
FILE: examples/reading_logs_with_offset/read.cc
function main (line 18) | int main() {
FILE: examples/simple_example_using_c/test.c
function main (line 26) | int main (int argc, char **argv)
FILE: examples/using_bodies_in_chunks/simple_request.cc
function logCb (line 69) | static void logCb(void *data, const void *ruleMessagev) {
function process_intervention (line 95) | int process_intervention(modsecurity::Transaction *transaction) {
function main (line 131) | int main(int argc, char **argv) {
FILE: headers/modsecurity/actions/action.h
function namespace (line 30) | namespace actions {
FILE: headers/modsecurity/anchored_set_variable.h
function namespace (line 39) | namespace modsecurity {
type MyHash (line 59) | struct MyHash{
FILE: headers/modsecurity/anchored_set_variable_translation_proxy.h
function class (line 37) | class AnchoredSetVariableTranslationProxy {
FILE: headers/modsecurity/anchored_variable.h
function namespace (line 39) | namespace modsecurity {
FILE: headers/modsecurity/audit_log.h
function namespace (line 28) | namespace modsecurity {
FILE: headers/modsecurity/collection/collection.h
type Variables (line 35) | typedef struct Variable_t Variables;
function namespace (line 39) | namespace modsecurity {
FILE: headers/modsecurity/collection/collections.h
type Collections (line 38) | typedef struct Collections_t Collections;
function namespace (line 43) | namespace modsecurity {
FILE: headers/modsecurity/debug_log.h
type DebugLog (line 25) | typedef struct DebugLog_t DebugLog;
function namespace (line 30) | namespace modsecurity {
FILE: headers/modsecurity/intervention.h
function namespace (line 20) | namespace modsecurity {
FILE: headers/modsecurity/modsecurity.h
type modsecurity (line 94) | typedef struct ModSecurity_t modsecurity;
function namespace (line 96) | namespace modsecurity {
function namespace (line 229) | namespace actions {
type LogProperty (line 242) | enum LogProperty {
function class (line 276) | class ModSecurity {
FILE: headers/modsecurity/rule.h
function namespace (line 31) | namespace modsecurity {
FILE: headers/modsecurity/rule_marker.h
function namespace (line 29) | namespace modsecurity {
FILE: headers/modsecurity/rule_message.h
function namespace (line 29) | namespace modsecurity {
FILE: headers/modsecurity/rule_unconditional.h
function namespace (line 32) | namespace modsecurity {
FILE: headers/modsecurity/rule_with_actions.h
function namespace (line 35) | namespace modsecurity {
FILE: headers/modsecurity/rule_with_operator.h
function namespace (line 36) | namespace modsecurity {
FILE: headers/modsecurity/rules_exceptions.h
function namespace (line 37) | namespace modsecurity {
FILE: headers/modsecurity/rules_set.h
function namespace (line 42) | namespace Parser {
function class (line 49) | class RulesSet : public RulesSetProperties {
FILE: headers/modsecurity/rules_set_phases.h
function namespace (line 36) | namespace modsecurity {
FILE: headers/modsecurity/rules_set_properties.h
function namespace (line 74) | namespace Parser {
function merge (line 90) | void merge(const ConfigValue<T>* from) {
function maxValue (line 182) | int32_t maxValue() const override {
function class (line 194) | class ConfigUnsignedLong : public ConfigValue<uint64_t> {
function class (line 202) | class ConfigString {
function class (line 219) | class ConfigSet {
function class (line 228) | class UnicodeMapHolder {
function class (line 245) | class ConfigUnicodeMap {
function class (line 272) | class RulesSetProperties {
FILE: headers/modsecurity/transaction.h
type ModSecurity (line 40) | typedef struct ModSecurity_t ModSecurity;
type Transaction (line 41) | typedef struct Transaction_t Transaction;
type RulesSet (line 42) | typedef struct Rules_t RulesSet;
function namespace (line 107) | namespace actions {
function namespace (line 113) | namespace RequestBodyProcessor {
function namespace (line 118) | namespace operators {
function class (line 123) | class TransactionAnchoredVariables {
function class (line 299) | class TransactionSecMarkerManagement {
type RequestBodyType (line 348) | enum RequestBodyType {
FILE: headers/modsecurity/variable_origin.h
type DebugLog (line 26) | typedef struct DebugLog_t DebugLog;
function namespace (line 31) | namespace modsecurity {
FILE: headers/modsecurity/variable_value.h
type VariableValue (line 31) | typedef struct Variable_t VariableValue;
function namespace (line 35) | namespace modsecurity {
function setValue (line 94) | void setValue(const std::string &value) {
function addOrigin (line 99) | void addOrigin(const VariableOrigin &origin) {
function reserveOrigin (line 115) | void reserveOrigin(Origins::size_type additionalSize) {
FILE: src/actions/accuracy.cc
type modsecurity::actions (line 21) | namespace modsecurity::actions {
FILE: src/actions/accuracy.h
function namespace (line 25) | namespace modsecurity {
FILE: src/actions/action.cc
type modsecurity (line 44) | namespace modsecurity {
type actions (line 45) | namespace actions {
FILE: src/actions/audit_log.cc
type modsecurity (line 26) | namespace modsecurity {
type actions (line 27) | namespace actions {
FILE: src/actions/audit_log.h
function namespace (line 27) | namespace modsecurity {
FILE: src/actions/block.cc
type modsecurity (line 28) | namespace modsecurity {
type actions (line 29) | namespace actions {
FILE: src/actions/block.h
function namespace (line 28) | namespace modsecurity {
FILE: src/actions/capture.cc
type modsecurity (line 31) | namespace modsecurity {
type actions (line 32) | namespace actions {
FILE: src/actions/capture.h
function namespace (line 24) | namespace modsecurity {
FILE: src/actions/chain.cc
type modsecurity::actions (line 20) | namespace modsecurity::actions {
FILE: src/actions/chain.h
function namespace (line 26) | namespace modsecurity {
FILE: src/actions/ctl/audit_engine.cc
type modsecurity (line 24) | namespace modsecurity {
type actions (line 25) | namespace actions {
type ctl (line 26) | namespace ctl {
FILE: src/actions/ctl/audit_engine.h
function namespace (line 27) | namespace modsecurity {
FILE: src/actions/ctl/audit_log_parts.cc
type modsecurity (line 24) | namespace modsecurity {
type actions (line 25) | namespace actions {
type ctl (line 26) | namespace ctl {
FILE: src/actions/ctl/audit_log_parts.h
function namespace (line 24) | namespace modsecurity {
FILE: src/actions/ctl/parse_xml_into_args.cc
type modsecurity (line 25) | namespace modsecurity {
type actions (line 26) | namespace actions {
type ctl (line 27) | namespace ctl {
FILE: src/actions/ctl/parse_xml_into_args.h
function namespace (line 26) | namespace modsecurity {
FILE: src/actions/ctl/request_body_access.cc
type modsecurity (line 24) | namespace modsecurity {
type actions (line 25) | namespace actions {
type ctl (line 26) | namespace ctl {
FILE: src/actions/ctl/request_body_access.h
function namespace (line 25) | namespace modsecurity {
FILE: src/actions/ctl/request_body_processor_json.cc
type modsecurity (line 23) | namespace modsecurity {
type actions (line 24) | namespace actions {
type ctl (line 25) | namespace ctl {
FILE: src/actions/ctl/request_body_processor_json.h
function namespace (line 24) | namespace modsecurity {
FILE: src/actions/ctl/request_body_processor_urlencoded.cc
type modsecurity (line 23) | namespace modsecurity {
type actions (line 24) | namespace actions {
type ctl (line 25) | namespace ctl {
FILE: src/actions/ctl/request_body_processor_urlencoded.h
function namespace (line 24) | namespace modsecurity {
FILE: src/actions/ctl/request_body_processor_xml.cc
type modsecurity (line 23) | namespace modsecurity {
type actions (line 24) | namespace actions {
type ctl (line 25) | namespace ctl {
FILE: src/actions/ctl/request_body_processor_xml.h
function namespace (line 24) | namespace modsecurity {
FILE: src/actions/ctl/rule_engine.cc
type modsecurity (line 25) | namespace modsecurity {
type actions (line 26) | namespace actions {
type ctl (line 27) | namespace ctl {
FILE: src/actions/ctl/rule_engine.h
function namespace (line 26) | namespace modsecurity {
FILE: src/actions/ctl/rule_remove_by_id.cc
type modsecurity (line 24) | namespace modsecurity {
type actions (line 25) | namespace actions {
type ctl (line 26) | namespace ctl {
FILE: src/actions/ctl/rule_remove_by_id.h
function namespace (line 25) | namespace modsecurity {
FILE: src/actions/ctl/rule_remove_by_tag.cc
type modsecurity (line 23) | namespace modsecurity {
type actions (line 24) | namespace actions {
type ctl (line 25) | namespace ctl {
FILE: src/actions/ctl/rule_remove_by_tag.h
function namespace (line 25) | namespace modsecurity {
FILE: src/actions/ctl/rule_remove_target_by_id.cc
type modsecurity (line 27) | namespace modsecurity {
type actions (line 28) | namespace actions {
type ctl (line 29) | namespace ctl {
FILE: src/actions/ctl/rule_remove_target_by_id.h
function namespace (line 25) | namespace modsecurity {
FILE: src/actions/ctl/rule_remove_target_by_tag.cc
type modsecurity (line 27) | namespace modsecurity {
type actions (line 28) | namespace actions {
type ctl (line 29) | namespace ctl {
FILE: src/actions/ctl/rule_remove_target_by_tag.h
function namespace (line 25) | namespace modsecurity {
FILE: src/actions/data/status.cc
type modsecurity (line 25) | namespace modsecurity {
type actions (line 26) | namespace actions {
type data (line 27) | namespace data {
FILE: src/actions/data/status.h
function namespace (line 28) | namespace modsecurity {
FILE: src/actions/disruptive/allow.cc
type modsecurity (line 28) | namespace modsecurity {
type actions (line 29) | namespace actions {
type disruptive (line 30) | namespace disruptive {
FILE: src/actions/disruptive/allow.h
function namespace (line 26) | namespace modsecurity {
FILE: src/actions/disruptive/deny.cc
type modsecurity (line 26) | namespace modsecurity {
type actions (line 27) | namespace actions {
type disruptive (line 28) | namespace disruptive {
FILE: src/actions/disruptive/deny.h
function namespace (line 27) | namespace modsecurity {
FILE: src/actions/disruptive/drop.cc
type modsecurity (line 30) | namespace modsecurity {
type actions (line 31) | namespace actions {
type disruptive (line 32) | namespace disruptive {
FILE: src/actions/disruptive/drop.h
function namespace (line 26) | namespace modsecurity {
FILE: src/actions/disruptive/pass.cc
type modsecurity (line 27) | namespace modsecurity {
type actions (line 28) | namespace actions {
type disruptive (line 29) | namespace disruptive {
FILE: src/actions/disruptive/pass.h
function namespace (line 25) | namespace modsecurity {
FILE: src/actions/disruptive/redirect.cc
type modsecurity (line 26) | namespace modsecurity {
type actions (line 27) | namespace actions {
type disruptive (line 28) | namespace disruptive {
FILE: src/actions/disruptive/redirect.h
function namespace (line 30) | namespace modsecurity {
FILE: src/actions/exec.cc
type modsecurity (line 29) | namespace modsecurity {
type actions (line 30) | namespace actions {
FILE: src/actions/exec.h
function namespace (line 26) | namespace modsecurity {
FILE: src/actions/expire_var.cc
type modsecurity (line 31) | namespace modsecurity {
type actions (line 32) | namespace actions {
FILE: src/actions/expire_var.h
function namespace (line 28) | namespace modsecurity {
FILE: src/actions/init_col.cc
type modsecurity (line 26) | namespace modsecurity {
type actions (line 27) | namespace actions {
FILE: src/actions/init_col.h
function namespace (line 28) | namespace modsecurity {
FILE: src/actions/log.cc
type modsecurity (line 27) | namespace modsecurity {
type actions (line 28) | namespace actions {
FILE: src/actions/log.h
function namespace (line 26) | namespace modsecurity {
FILE: src/actions/log_data.cc
type modsecurity (line 28) | namespace modsecurity {
type actions (line 29) | namespace actions {
FILE: src/actions/log_data.h
function namespace (line 28) | namespace modsecurity {
FILE: src/actions/maturity.cc
type modsecurity::actions (line 21) | namespace modsecurity::actions {
FILE: src/actions/maturity.h
function namespace (line 25) | namespace modsecurity {
FILE: src/actions/msg.cc
type modsecurity (line 45) | namespace modsecurity {
type actions (line 46) | namespace actions {
FILE: src/actions/msg.h
function namespace (line 29) | namespace modsecurity {
FILE: src/actions/multi_match.cc
type modsecurity (line 24) | namespace modsecurity {
type actions (line 25) | namespace actions {
FILE: src/actions/multi_match.h
function namespace (line 26) | namespace modsecurity {
FILE: src/actions/no_audit_log.cc
type modsecurity (line 25) | namespace modsecurity {
type actions (line 26) | namespace actions {
FILE: src/actions/no_audit_log.h
function namespace (line 27) | namespace modsecurity {
FILE: src/actions/no_log.cc
type modsecurity (line 28) | namespace modsecurity {
type actions (line 29) | namespace actions {
FILE: src/actions/no_log.h
function namespace (line 26) | namespace modsecurity {
FILE: src/actions/phase.cc
type modsecurity::actions (line 22) | namespace modsecurity::actions {
FILE: src/actions/phase.h
function namespace (line 26) | namespace modsecurity {
FILE: src/actions/rev.cc
type modsecurity::actions (line 21) | namespace modsecurity::actions {
FILE: src/actions/rev.h
function namespace (line 25) | namespace modsecurity {
FILE: src/actions/rule_id.cc
type modsecurity::actions (line 21) | namespace modsecurity::actions {
FILE: src/actions/rule_id.h
function namespace (line 26) | namespace modsecurity {
FILE: src/actions/set_env.cc
type modsecurity (line 25) | namespace modsecurity {
type actions (line 26) | namespace actions {
FILE: src/actions/set_env.h
function namespace (line 28) | namespace modsecurity {
FILE: src/actions/set_rsc.cc
type modsecurity (line 25) | namespace modsecurity {
type actions (line 26) | namespace actions {
FILE: src/actions/set_rsc.h
function namespace (line 28) | namespace modsecurity {
FILE: src/actions/set_sid.cc
type modsecurity (line 25) | namespace modsecurity {
type actions (line 26) | namespace actions {
FILE: src/actions/set_sid.h
function namespace (line 28) | namespace modsecurity {
FILE: src/actions/set_uid.cc
type modsecurity (line 25) | namespace modsecurity {
type actions (line 26) | namespace actions {
FILE: src/actions/set_uid.h
function namespace (line 28) | namespace modsecurity {
FILE: src/actions/set_var.cc
type modsecurity (line 34) | namespace modsecurity {
type actions (line 35) | namespace actions {
FILE: src/actions/set_var.h
function namespace (line 26) | namespace modsecurity {
FILE: src/actions/severity.cc
type modsecurity (line 30) | namespace modsecurity {
type actions (line 31) | namespace actions {
FILE: src/actions/severity.h
function namespace (line 26) | namespace modsecurity {
FILE: src/actions/skip.cc
type modsecurity (line 25) | namespace modsecurity {
type actions (line 26) | namespace actions {
FILE: src/actions/skip.h
function namespace (line 25) | namespace modsecurity {
FILE: src/actions/skip_after.cc
type modsecurity (line 26) | namespace modsecurity {
type actions (line 27) | namespace actions {
FILE: src/actions/skip_after.h
function namespace (line 26) | namespace modsecurity {
FILE: src/actions/tag.cc
type modsecurity (line 50) | namespace modsecurity {
type actions (line 51) | namespace actions {
FILE: src/actions/tag.h
function namespace (line 28) | namespace modsecurity {
FILE: src/actions/transformations/base64_decode.cc
type modsecurity::actions::transformations (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/base64_decode.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/base64_decode_ext.cc
type modsecurity::actions::transformations (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/base64_decode_ext.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/base64_encode.cc
type modsecurity::actions::transformations (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/base64_encode.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/cmd_line.cc
type modsecurity::actions::transformations (line 19) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/cmd_line.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/compress_whitespace.cc
type modsecurity::actions::transformations (line 19) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/compress_whitespace.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/css_decode.cc
type modsecurity::actions::transformations (line 22) | namespace modsecurity::actions::transformations {
function css_decode_inplace (line 32) | static inline bool css_decode_inplace(std::string &val) {
FILE: src/actions/transformations/css_decode.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/escape_seq_decode.cc
type modsecurity::actions::transformations (line 22) | namespace modsecurity::actions::transformations {
function ansi_c_sequences_decode_inplace (line 25) | static inline int ansi_c_sequences_decode_inplace(std::string &value) {
FILE: src/actions/transformations/escape_seq_decode.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/hex_decode.cc
type modsecurity::actions::transformations (line 21) | namespace modsecurity::actions::transformations {
function inplace (line 24) | static inline int inplace(std::string &value) {
FILE: src/actions/transformations/hex_decode.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/hex_encode.cc
type modsecurity::actions::transformations (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/hex_encode.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/html_entity_decode.cc
type modsecurity::actions::transformations (line 28) | namespace modsecurity::actions::transformations {
function inplace (line 31) | static inline bool inplace(std::string &value) {
FILE: src/actions/transformations/html_entity_decode.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/js_decode.cc
type modsecurity::actions::transformations (line 22) | namespace modsecurity::actions::transformations {
function inplace (line 25) | static inline int inplace(std::string &value) {
FILE: src/actions/transformations/js_decode.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/length.cc
type modsecurity::actions::transformations (line 19) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/length.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/lower_case.cc
type modsecurity::actions::transformations (line 22) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/lower_case.h
function namespace (line 23) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/md5.cc
type modsecurity::actions::transformations (line 20) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/md5.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/none.cc
type modsecurity::actions::transformations (line 19) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/none.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/normalise_path.cc
type modsecurity::actions::transformations (line 19) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/normalise_path.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/normalise_path_win.cc
type modsecurity::actions::transformations (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/normalise_path_win.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/parity_even_7bit.cc
type modsecurity::actions::transformations (line 19) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/parity_even_7bit.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/parity_odd_7bit.cc
type modsecurity::actions::transformations (line 20) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/parity_odd_7bit.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/parity_zero_7bit.cc
type modsecurity::actions::transformations (line 19) | namespace modsecurity::actions::transformations {
function inplace (line 22) | static inline bool inplace(std::string &value) {
FILE: src/actions/transformations/parity_zero_7bit.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/remove_comments.cc
type modsecurity::actions::transformations (line 19) | namespace modsecurity::actions::transformations {
function inplace (line 22) | static inline int inplace(std::string &value) {
FILE: src/actions/transformations/remove_comments.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/remove_comments_char.cc
type modsecurity::actions::transformations (line 19) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/remove_comments_char.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/remove_nulls.cc
type modsecurity::actions::transformations (line 19) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/remove_nulls.h
function namespace (line 23) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/remove_whitespace.cc
type modsecurity::actions::transformations (line 20) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/remove_whitespace.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/replace_comments.cc
type modsecurity::actions::transformations (line 19) | namespace modsecurity::actions::transformations {
function inplace (line 22) | static inline bool inplace(std::string &value) {
FILE: src/actions/transformations/replace_comments.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/replace_nulls.cc
type modsecurity::actions::transformations (line 19) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/replace_nulls.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/sha1.cc
type modsecurity::actions::transformations (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/sha1.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/sql_hex_decode.cc
type modsecurity::actions::transformations (line 24) | namespace modsecurity::actions::transformations {
function mytolower (line 27) | static inline int mytolower(int ch) {
function inplace (line 34) | static inline bool inplace(std::string &value) {
FILE: src/actions/transformations/sql_hex_decode.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/transformation.cc
type modsecurity::actions::transformations (line 67) | namespace modsecurity::actions::transformations {
function Transformation (line 74) | Transformation* Transformation::instantiate(std::string a) {
FILE: src/actions/transformations/transformation.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/trim.cc
type modsecurity::actions::transformations (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/trim.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/trim_left.cc
type modsecurity::actions::transformations (line 20) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/trim_left.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/trim_right.cc
type modsecurity::actions::transformations (line 20) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/trim_right.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/upper_case.cc
type modsecurity::actions::transformations (line 24) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/upper_case.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/url_decode.cc
type modsecurity::actions::transformations (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/url_decode.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/url_decode_uni.cc
type modsecurity::actions::transformations (line 23) | namespace modsecurity::actions::transformations {
function inplace (line 30) | static inline bool inplace(std::string &value,
FILE: src/actions/transformations/url_decode_uni.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/url_encode.cc
type modsecurity::actions::transformations (line 20) | namespace modsecurity::actions::transformations {
function url_enc (line 23) | static inline bool url_enc(std::string &value) {
FILE: src/actions/transformations/url_encode.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/transformations/utf8_to_unicode.cc
type modsecurity::actions::transformations (line 27) | namespace modsecurity::actions::transformations {
function encode (line 30) | static inline bool encode(std::string &value) {
FILE: src/actions/transformations/utf8_to_unicode.h
function namespace (line 21) | namespace modsecurity::actions::transformations {
FILE: src/actions/ver.cc
type modsecurity::actions (line 21) | namespace modsecurity::actions {
FILE: src/actions/ver.h
function namespace (line 25) | namespace modsecurity {
FILE: src/actions/xmlns.cc
type modsecurity (line 24) | namespace modsecurity {
type actions (line 25) | namespace actions {
FILE: src/actions/xmlns.h
function namespace (line 25) | namespace modsecurity {
FILE: src/anchored_set_variable.cc
type modsecurity (line 28) | namespace modsecurity {
FILE: src/anchored_variable.cc
type modsecurity (line 27) | namespace modsecurity {
FILE: src/audit_log/audit_log.cc
type modsecurity (line 50) | namespace modsecurity {
type audit_log (line 51) | namespace audit_log {
FILE: src/audit_log/writer/https.cc
type modsecurity (line 36) | namespace modsecurity {
type audit_log (line 37) | namespace audit_log {
type writer (line 38) | namespace writer {
FILE: src/audit_log/writer/https.h
function namespace (line 30) | namespace modsecurity {
FILE: src/audit_log/writer/parallel.cc
type modsecurity (line 41) | namespace modsecurity {
type audit_log (line 42) | namespace audit_log {
type writer (line 43) | namespace writer {
type tm (line 56) | struct tm
FILE: src/audit_log/writer/parallel.h
function namespace (line 29) | namespace modsecurity {
FILE: src/audit_log/writer/serial.cc
type modsecurity (line 20) | namespace modsecurity {
type audit_log (line 21) | namespace audit_log {
type writer (line 22) | namespace writer {
FILE: src/audit_log/writer/serial.h
function namespace (line 33) | namespace modsecurity {
FILE: src/audit_log/writer/writer.cc
type modsecurity (line 22) | namespace modsecurity {
type audit_log (line 23) | namespace audit_log {
type writer (line 24) | namespace writer {
FILE: src/audit_log/writer/writer.h
function namespace (line 38) | namespace modsecurity {
FILE: src/collection/backend/collection_data.cc
type modsecurity (line 19) | namespace modsecurity {
type collection (line 20) | namespace collection {
type backend (line 21) | namespace backend {
FILE: src/collection/backend/collection_data.h
function namespace (line 27) | namespace modsecurity {
FILE: src/collection/backend/in_memory-per_process.cc
type modsecurity (line 33) | namespace modsecurity {
type collection (line 34) | namespace collection {
type backend (line 35) | namespace backend {
function __store (line 49) | inline void __store(Map &map, std::string key, std::string value) {
function __updateFirst (line 57) | inline bool __updateFirst(Map &map,
FILE: src/collection/backend/in_memory-per_process.h
function namespace (line 39) | namespace modsecurity {
FILE: src/collection/backend/lmdb.cc
type modsecurity (line 36) | namespace modsecurity {
type collection (line 37) | namespace collection {
type backend (line 38) | namespace backend {
function MDB_env (line 656) | MDB_env* MDBEnvProvider::GetEnv() {
function MDB_dbi (line 660) | MDB_dbi* MDBEnvProvider::GetDBI() {
FILE: src/collection/backend/lmdb.h
function namespace (line 45) | namespace modsecurity {
FILE: src/collection/collections.cc
type modsecurity (line 33) | namespace modsecurity {
type collection (line 34) | namespace collection {
FILE: src/compat/msvc.h
function tm (line 16) | inline tm* localtime_r(const time_t* tin, tm* tout) {
FILE: src/debug_log/debug_log.cc
type modsecurity (line 22) | namespace modsecurity {
type debug_log (line 23) | namespace debug_log {
FILE: src/debug_log/debug_log_writer.cc
type modsecurity (line 20) | namespace modsecurity {
type debug_log (line 21) | namespace debug_log {
FILE: src/debug_log/debug_log_writer.h
function namespace (line 23) | namespace modsecurity {
FILE: src/debug_log_writer_agent.h
function namespace (line 23) | namespace modsecurity {
FILE: src/engine/lua.cc
type modsecurity (line 38) | namespace modsecurity {
type engine (line 39) | namespace engine {
FILE: src/engine/lua.h
function namespace (line 28) | namespace modsecurity {
function luaL_setfuncs (line 113) | static void luaL_setfuncs(lua_State *L, const luaL_Reg *l, int nup) {
FILE: src/modsecurity.cc
type modsecurity (line 45) | namespace modsecurity {
function msc_set_log_cb (line 411) | void msc_set_log_cb(ModSecurity *msc, ModSecLogCb cb) {
function msc_set_connector_info (line 432) | void msc_set_connector_info(ModSecurity *msc,
function msc_cleanup (line 462) | void msc_cleanup(ModSecurity *msc) {
function ModSecurity (line 480) | ModSecurity *msc_init(void) {
FILE: src/operators/begins_with.cc
type modsecurity (line 23) | namespace modsecurity {
type operators (line 24) | namespace operators {
FILE: src/operators/begins_with.h
function namespace (line 26) | namespace modsecurity {
FILE: src/operators/contains.cc
type modsecurity (line 21) | namespace modsecurity {
type operators (line 22) | namespace operators {
FILE: src/operators/contains.h
function namespace (line 29) | namespace modsecurity {
FILE: src/operators/contains_word.cc
type modsecurity (line 23) | namespace modsecurity {
type operators (line 24) | namespace operators {
FILE: src/operators/contains_word.h
function namespace (line 26) | namespace modsecurity {
FILE: src/operators/detect_sqli.cc
type modsecurity (line 24) | namespace modsecurity {
type operators (line 25) | namespace operators {
FILE: src/operators/detect_sqli.h
function namespace (line 24) | namespace modsecurity {
FILE: src/operators/detect_xss.cc
type modsecurity (line 24) | namespace modsecurity {
type operators (line 25) | namespace operators {
FILE: src/operators/detect_xss.h
function namespace (line 23) | namespace modsecurity {
FILE: src/operators/ends_with.cc
type modsecurity (line 22) | namespace modsecurity {
type operators (line 23) | namespace operators {
FILE: src/operators/ends_with.h
function namespace (line 26) | namespace modsecurity {
FILE: src/operators/eq.cc
type modsecurity (line 23) | namespace modsecurity {
type operators (line 24) | namespace operators {
FILE: src/operators/eq.h
function namespace (line 26) | namespace modsecurity {
FILE: src/operators/fuzzy_hash.cc
type modsecurity (line 23) | namespace modsecurity {
type operators (line 24) | namespace operators {
FILE: src/operators/fuzzy_hash.h
function namespace (line 29) | namespace modsecurity {
FILE: src/operators/ge.cc
type modsecurity (line 23) | namespace modsecurity {
type operators (line 24) | namespace operators {
FILE: src/operators/ge.h
function namespace (line 25) | namespace modsecurity {
FILE: src/operators/geo_lookup.cc
type modsecurity::operators (line 33) | namespace modsecurity::operators {
function debug (line 36) | static bool debug(const Transaction *transaction, int x, const std::st...
FILE: src/operators/geo_lookup.h
function namespace (line 24) | namespace modsecurity::operators {
FILE: src/operators/gsblookup.cc
type modsecurity (line 22) | namespace modsecurity {
type operators (line 23) | namespace operators {
FILE: src/operators/gsblookup.h
function namespace (line 25) | namespace modsecurity {
FILE: src/operators/gt.cc
type modsecurity (line 23) | namespace modsecurity {
type operators (line 24) | namespace operators {
FILE: src/operators/gt.h
function namespace (line 26) | namespace modsecurity {
FILE: src/operators/inspect_file.cc
type modsecurity (line 30) | namespace modsecurity {
type operators (line 31) | namespace operators {
FILE: src/operators/inspect_file.h
function namespace (line 27) | namespace modsecurity {
FILE: src/operators/ip_match.cc
type modsecurity (line 24) | namespace modsecurity {
type operators (line 25) | namespace operators {
FILE: src/operators/ip_match.h
function namespace (line 26) | namespace modsecurity {
FILE: src/operators/ip_match_f.cc
type modsecurity (line 22) | namespace modsecurity {
type operators (line 23) | namespace operators {
FILE: src/operators/ip_match_f.h
function namespace (line 26) | namespace modsecurity {
FILE: src/operators/ip_match_from_file.cc
type modsecurity (line 25) | namespace modsecurity {
type operators (line 26) | namespace operators {
FILE: src/operators/ip_match_from_file.h
function namespace (line 24) | namespace modsecurity {
FILE: src/operators/le.cc
type modsecurity (line 23) | namespace modsecurity {
type operators (line 24) | namespace operators {
FILE: src/operators/le.h
function namespace (line 26) | namespace modsecurity {
FILE: src/operators/lt.cc
type modsecurity (line 22) | namespace modsecurity {
type operators (line 23) | namespace operators {
FILE: src/operators/lt.h
function namespace (line 26) | namespace modsecurity {
FILE: src/operators/no_match.cc
type modsecurity (line 20) | namespace modsecurity {
type operators (line 21) | namespace operators {
FILE: src/operators/no_match.h
function namespace (line 26) | namespace modsecurity {
FILE: src/operators/operator.cc
type modsecurity (line 69) | namespace modsecurity {
type operators (line 70) | namespace operators {
function Operator (line 141) | Operator *Operator::instantiate(const std::string& op, const std::st...
FILE: src/operators/operator.h
function namespace (line 28) | namespace modsecurity {
function virtual (line 103) | virtual ~Operator() { }
function virtual (line 107) | virtual bool init(const std::string &arg, std::string *error) {
function virtual (line 122) | virtual bool evaluate(Transaction *transaction, RuleWithActions *rule,
function virtual (line 126) | virtual bool evaluate(Transaction *transaction, RuleWithActions *rule,
function logOffset (line 131) | static void logOffset(RuleMessage &ruleMessage, int offset, int len) {
FILE: src/operators/pm.cc
function parse_pm_content (line 27) | static inline std::string parse_pm_content(const std::string &op_parm) {
type modsecurity (line 93) | namespace modsecurity {
type operators (line 94) | namespace operators {
FILE: src/operators/pm.h
function namespace (line 28) | namespace modsecurity {
FILE: src/operators/pm_f.h
function namespace (line 26) | namespace modsecurity {
FILE: src/operators/pm_from_file.cc
type modsecurity (line 27) | namespace modsecurity {
type operators (line 28) | namespace operators {
FILE: src/operators/pm_from_file.h
function namespace (line 26) | namespace modsecurity {
FILE: src/operators/rbl.cc
type modsecurity (line 34) | namespace modsecurity {
type operators (line 35) | namespace operators {
type sockaddr_in (line 75) | struct sockaddr_in
type sockaddr_in (line 187) | struct sockaddr_in
type addrinfo (line 211) | struct addrinfo
type sockaddr (line 231) | struct sockaddr
type sockaddr_in (line 233) | struct sockaddr_in
FILE: src/operators/rbl.h
function namespace (line 36) | namespace modsecurity::operators {
FILE: src/operators/rsub.cc
type modsecurity (line 22) | namespace modsecurity {
type operators (line 23) | namespace operators {
FILE: src/operators/rsub.h
function namespace (line 26) | namespace modsecurity {
FILE: src/operators/rx.cc
type modsecurity (line 26) | namespace modsecurity {
type operators (line 27) | namespace operators {
FILE: src/operators/rx.h
function namespace (line 28) | namespace modsecurity {
FILE: src/operators/rx_global.cc
type modsecurity (line 26) | namespace modsecurity {
type operators (line 27) | namespace operators {
FILE: src/operators/rx_global.h
function namespace (line 28) | namespace modsecurity {
FILE: src/operators/str_eq.cc
type modsecurity (line 20) | namespace modsecurity {
type operators (line 21) | namespace operators {
FILE: src/operators/str_eq.h
function namespace (line 28) | namespace modsecurity {
FILE: src/operators/str_match.cc
type modsecurity (line 23) | namespace modsecurity {
type operators (line 24) | namespace operators {
FILE: src/operators/str_match.h
function namespace (line 26) | namespace modsecurity {
FILE: src/operators/unconditional_match.cc
type modsecurity (line 18) | namespace modsecurity {
type operators (line 19) | namespace operators {
FILE: src/operators/unconditional_match.h
function namespace (line 25) | namespace modsecurity {
FILE: src/operators/validate_byte_range.cc
type modsecurity (line 23) | namespace modsecurity {
type operators (line 24) | namespace operators {
FILE: src/operators/validate_byte_range.h
function namespace (line 28) | namespace modsecurity {
FILE: src/operators/validate_dtd.cc
type modsecurity (line 24) | namespace modsecurity {
type operators (line 25) | namespace operators {
FILE: src/operators/validate_dtd.h
function namespace (line 34) | namespace modsecurity {
FILE: src/operators/validate_hash.cc
type modsecurity (line 22) | namespace modsecurity {
type operators (line 23) | namespace operators {
FILE: src/operators/validate_hash.h
function namespace (line 26) | namespace modsecurity {
FILE: src/operators/validate_schema.cc
type modsecurity (line 25) | namespace modsecurity {
type operators (line 26) | namespace operators {
FILE: src/operators/validate_schema.h
function namespace (line 33) | namespace modsecurity {
FILE: src/operators/validate_url_encoding.cc
type modsecurity (line 22) | namespace modsecurity {
type operators (line 23) | namespace operators {
FILE: src/operators/validate_url_encoding.h
function namespace (line 25) | namespace modsecurity {
FILE: src/operators/validate_utf8_encoding.cc
type modsecurity (line 30) | namespace modsecurity {
type operators (line 31) | namespace operators {
FILE: src/operators/validate_utf8_encoding.h
function namespace (line 25) | namespace modsecurity {
FILE: src/operators/verify_cc.cc
type modsecurity (line 33) | namespace modsecurity {
type operators (line 34) | namespace operators {
FILE: src/operators/verify_cc.h
function namespace (line 33) | namespace modsecurity {
FILE: src/operators/verify_cpf.cc
type modsecurity (line 23) | namespace modsecurity {
type operators (line 24) | namespace operators {
FILE: src/operators/verify_cpf.h
function namespace (line 27) | namespace modsecurity {
FILE: src/operators/verify_ssn.cc
type modsecurity (line 24) | namespace modsecurity {
type operators (line 25) | namespace operators {
FILE: src/operators/verify_ssn.h
function namespace (line 27) | namespace modsecurity {
FILE: src/operators/verify_svnr.cc
type modsecurity (line 13) | namespace modsecurity {
type operators (line 14) | namespace operators {
FILE: src/operators/verify_svnr.h
function namespace (line 13) | namespace modsecurity {
FILE: src/operators/within.cc
type modsecurity (line 23) | namespace modsecurity {
type operators (line 24) | namespace operators {
FILE: src/operators/within.h
function namespace (line 26) | namespace modsecurity {
FILE: src/parser/driver.cc
type modsecurity (line 26) | namespace modsecurity {
type Parser (line 27) | namespace Parser {
FILE: src/parser/driver.h
function namespace (line 46) | namespace modsecurity {
FILE: src/parser/location.hh
type yy (line 56) | namespace yy {
class position (line 60) | class position
method position (line 69) | explicit position (filename_type* f = YY_NULLPTR,
method initialize (line 79) | void initialize (filename_type* fn = YY_NULLPTR,
method lines (line 91) | void lines (counter_type count = 1)
method columns (line 101) | void columns (counter_type count = 1)
method counter_type (line 116) | static counter_type add_ (counter_type lhs, counter_type rhs, counte...
function position (line 123) | inline position&
method position (line 69) | explicit position (filename_type* f = YY_NULLPTR,
method initialize (line 79) | void initialize (filename_type* fn = YY_NULLPTR,
method lines (line 91) | void lines (counter_type count = 1)
method columns (line 101) | void columns (counter_type count = 1)
method counter_type (line 116) | static counter_type add_ (counter_type lhs, counter_type rhs, counte...
function position (line 131) | inline position
method position (line 69) | explicit position (filename_type* f = YY_NULLPTR,
method initialize (line 79) | void initialize (filename_type* fn = YY_NULLPTR,
method lines (line 91) | void lines (counter_type count = 1)
method columns (line 101) | void columns (counter_type count = 1)
method counter_type (line 116) | static counter_type add_ (counter_type lhs, counter_type rhs, counte...
function position (line 138) | inline position&
method position (line 69) | explicit position (filename_type* f = YY_NULLPTR,
method initialize (line 79) | void initialize (filename_type* fn = YY_NULLPTR,
method lines (line 91) | void lines (counter_type count = 1)
method columns (line 101) | void columns (counter_type count = 1)
method counter_type (line 116) | static counter_type add_ (counter_type lhs, counter_type rhs, counte...
function position (line 145) | inline position
method position (line 69) | explicit position (filename_type* f = YY_NULLPTR,
method initialize (line 79) | void initialize (filename_type* fn = YY_NULLPTR,
method lines (line 91) | void lines (counter_type count = 1)
method columns (line 101) | void columns (counter_type count = 1)
method counter_type (line 116) | static counter_type add_ (counter_type lhs, counter_type rhs, counte...
class location (line 165) | class location
method location (line 174) | location (const position& b, const position& e)
method location (line 180) | explicit location (const position& p = position ())
method location (line 186) | explicit location (filename_type* f,
method initialize (line 195) | void initialize (filename_type* f = YY_NULLPTR,
method step (line 207) | void step ()
method columns (line 213) | void columns (counter_type count = 1)
method lines (line 219) | void lines (counter_type count = 1)
function location (line 234) | inline location&
method location (line 174) | location (const position& b, const position& e)
method location (line 180) | explicit location (const position& p = position ())
method location (line 186) | explicit location (filename_type* f,
method initialize (line 195) | void initialize (filename_type* f = YY_NULLPTR,
method step (line 207) | void step ()
method columns (line 213) | void columns (counter_type count = 1)
method lines (line 219) | void lines (counter_type count = 1)
function location (line 242) | inline location
method location (line 174) | location (const position& b, const position& e)
method location (line 180) | explicit location (const position& p = position ())
method location (line 186) | explicit location (filename_type* f,
method initialize (line 195) | void initialize (filename_type* f = YY_NULLPTR,
method step (line 207) | void step ()
method columns (line 213) | void columns (counter_type count = 1)
method lines (line 219) | void lines (counter_type count = 1)
function location (line 249) | inline location&
method location (line 174) | location (const position& b, const position& e)
method location (line 180) | explicit location (const position& p = position ())
method location (line 186) | explicit location (filename_type* f,
method initialize (line 195) | void initialize (filename_type* f = YY_NULLPTR,
method step (line 207) | void step ()
method columns (line 213) | void columns (counter_type count = 1)
method lines (line 219) | void lines (counter_type count = 1)
function location (line 257) | inline location
method location (line 174) | location (const position& b, const position& e)
method location (line 180) | explicit location (const position& p = position ())
method location (line 186) | explicit location (filename_type* f,
method initialize (line 195) | void initialize (filename_type* f = YY_NULLPTR,
method step (line 207) | void step ()
method columns (line 213) | void columns (counter_type count = 1)
method lines (line 219) | void lines (counter_type count = 1)
function location (line 264) | inline location&
method location (line 174) | location (const position& b, const position& e)
method location (line 180) | explicit location (const position& p = position ())
method location (line 186) | explicit location (filename_type* f,
method initialize (line 195) | void initialize (filename_type* f = YY_NULLPTR,
method step (line 207) | void step ()
method columns (line 213) | void columns (counter_type count = 1)
method lines (line 219) | void lines (counter_type count = 1)
function location (line 271) | inline location
method location (line 174) | location (const position& b, const position& e)
method location (line 180) | explicit location (const position& p = position ())
method location (line 186) | explicit location (filename_type* f,
method initialize (line 195) | void initialize (filename_type* f = YY_NULLPTR,
method step (line 207) | void step ()
method columns (line 213) | void columns (counter_type count = 1)
method lines (line 219) | void lines (counter_type count = 1)
FILE: src/parser/seclang-parser.cc
type yy (line 140) | namespace yy {
function YY_NOEXCEPT (line 157) | YY_NOEXCEPT YY_NOTHROW
function catch (line 1393) | catch (const syntax_error& yyexc)
function catch (line 5813) | catch (const syntax_error& yyexc)
function catch (line 5960) | catch (...)
FILE: src/parser/seclang-parser.hh
type ModSecurity (line 53) | namespace ModSecurity {
type Parser (line 54) | namespace Parser {
class Driver (line 55) | class Driver
class value_type (line 519) | class value_type
method value_type (line 526) | value_type () YY_NOEXCEPT
method value_type (line 533) | value_type (YY_RVREF (T) t)
method value_type (line 542) | value_type (const self_type&) = delete;
method self_type (line 544) | self_type& operator= (const self_type&) = delete;
method T (line 556) | T&
method T (line 567) | T&
method T (line 578) | T&
method T (line 591) | T&
method T (line 600) | T&
method T (line 608) | T&
method T (line 619) | const T&
method swap (line 637) | void
method move (line 649) | void
method move (line 664) | void
method copy (line 674) | void
method destroy (line 682) | void
method T (line 699) | T*
method T (line 708) | const T*
type syntax_error (line 971) | struct syntax_error : std::runtime_error
method syntax_error (line 973) | syntax_error (const location_type& l, const std::string& m)
method syntax_error (line 978) | syntax_error (const syntax_error& s)
type token (line 989) | struct token
type token_kind_type (line 991) | enum token_kind_type
type symbol_kind (line 1358) | struct symbol_kind
type symbol_kind_type (line 1360) | enum symbol_kind_type
type basic_symbol (line 1748) | struct basic_symbol : Base
method basic_symbol (line 1754) | basic_symbol () YY_NOEXCEPT
method basic_symbol (line 1761) | basic_symbol (basic_symbol&& that)
method basic_symbol (line 2015) | basic_symbol (typename Base::kind_type t, location_type&& l)
method basic_symbol (line 2020) | basic_symbol (typename Base::kind_type t, const location_type& l)
method basic_symbol (line 2027) | basic_symbol (typename Base::kind_type t, std::string&& v, location_ty...
method basic_symbol (line 2033) | basic_symbol (typename Base::kind_type t, const std::string& v, const ...
method basic_symbol (line 2041) | basic_symbol (typename Base::kind_type t, std::unique_ptr<Operator>&& ...
method basic_symbol (line 2047) | basic_symbol (typename Base::kind_type t, const std::unique_ptr<Operat...
method basic_symbol (line 2055) | basic_symbol (typename Base::kind_type t, std::unique_ptr<RunTimeStrin...
method basic_symbol (line 2061) | basic_symbol (typename Base::kind_type t, const std::unique_ptr<RunTim...
method basic_symbol (line 2069) | basic_symbol (typename Base::kind_type t, std::unique_ptr<Variable>&& ...
method basic_symbol (line 2075) | basic_symbol (typename Base::kind_type t, const std::unique_ptr<Variab...
method basic_symbol (line 2083) | basic_symbol (typename Base::kind_type t, std::unique_ptr<actions::Act...
method basic_symbol (line 2089) | basic_symbol (typename Base::kind_type t, const std::unique_ptr<action...
method basic_symbol (line 2097) | basic_symbol (typename Base::kind_type t, std::unique_ptr<std::vector<...
method basic_symbol (line 2103) | basic_symbol (typename Base::kind_type t, const std::unique_ptr<std::v...
method basic_symbol (line 2111) | basic_symbol (typename Base::kind_type t, std::unique_ptr<std::vector<...
method basic_symbol (line 2117) | basic_symbol (typename Base::kind_type t, const std::unique_ptr<std::v...
method name (line 2457) | std::string name () const YY_NOEXCEPT
type by_kind (line 2485) | struct by_kind
function symbol_type (line 2534) | symbol_type () YY_NOEXCEPT {}
function symbol_type (line 2541) | symbol_type (int tok, const location_type& l)
function symbol_type (line 2554) | symbol_type (int tok, const std::string& v, const location_type& l)
function seclang_parser (line 2570) | seclang_parser (const seclang_parser&) = delete;
function seclang_parser (line 2572) | seclang_parser& operator= (const seclang_parser&) = delete;
function symbol_type (line 2611) | static
function symbol_type (line 2618) | static
function symbol_type (line 2626) | static
function symbol_type (line 2633) | static
function symbol_type (line 2641) | static
function symbol_type (line 2648) | static
function symbol_type (line 2656) | static
function symbol_type (line 2663) | static
function symbol_type (line 2671) | static
function symbol_type (line 2678) | static
function symbol_type (line 2686) | static
function symbol_type (line 2693) | static
function symbol_type (line 2701) | static
function symbol_type (line 2708) | static
function symbol_type (line 2716) | static
function symbol_type (line 2723) | static
function symbol_type (line 2731) | static
function symbol_type (line 2738) | static
function symbol_type (line 2746) | static
function symbol_type (line 2753) | static
function symbol_type (line 2761) | static
function symbol_type (line 2768) | static
function symbol_type (line 2776) | static
function symbol_type (line 2783) | static
function symbol_type (line 2791) | static
function symbol_type (line 2798) | static
function symbol_type (line 2806) | static
function symbol_type (line 2813) | static
function symbol_type (line 2821) | static
function symbol_type (line 2828) | static
function symbol_type (line 2836) | static
function symbol_type (line 2843) | static
function symbol_type (line 2851) | static
function symbol_type (line 2858) | static
function symbol_type (line 2866) | static
function symbol_type (line 2873) | static
function symbol_type (line 2881) | static
function symbol_type (line 2888) | static
function symbol_type (line 2896) | static
function symbol_type (line 2903) | static
function symbol_type (line 2911) | static
function symbol_type (line 2918) | static
function symbol_type (line 2926) | static
function symbol_type (line 2933) | static
function symbol_type (line 2941) | static
function symbol_type (line 2948) | static
function symbol_type (line 2956) | static
function symbol_type (line 2963) | static
function symbol_type (line 2971) | static
function symbol_type (line 2978) | static
function symbol_type (line 2986) | static
function symbol_type (line 2993) | static
function symbol_type (line 3001) | static
function symbol_type (line 3008) | static
function symbol_type (line 3016) | static
function symbol_type (line 3023) | static
function symbol_type (line 3031) | static
function symbol_type (line 3038) | static
function symbol_type (line 3046) | static
function symbol_type (line 3053) | static
function symbol_type (line 3061) | static
function symbol_type (line 3068) | static
function symbol_type (line 3076) | static
function symbol_type (line 3083) | static
function symbol_type (line 3091) | static
function symbol_type (line 3098) | static
function symbol_type (line 3106) | static
function symbol_type (line 3113) | static
function symbol_type (line 3121) | static
function symbol_type (line 3128) | static
function symbol_type (line 3136) | static
function symbol_type (line 3143) | static
function symbol_type (line 3151) | static
function symbol_type (line 3158) | static
function symbol_type (line 3166) | static
function symbol_type (line 3173) | static
function symbol_type (line 3181) | static
function symbol_type (line 3188) | static
function symbol_type (line 3196) | static
function symbol_type (line 3203) | static
function symbol_type (line 3211) | static
function symbol_type (line 3218) | static
function symbol_type (line 3226) | static
function symbol_type (line 3233) | static
function symbol_type (line 3241) | static
function symbol_type (line 3248) | static
function symbol_type (line 3256) | static
function symbol_type (line 3263) | static
function symbol_type (line 3271) | static
function symbol_type (line 3278) | static
function symbol_type (line 3286) | static
function symbol_type (line 3293) | static
function symbol_type (line 3301) | static
function symbol_type (line 3308) | static
function symbol_type (line 3316) | static
function symbol_type (line 3323) | static
function symbol_type (line 3331) | static
function symbol_type (line 3338) | static
function symbol_type (line 3346) | static
function symbol_type (line 3353) | static
function symbol_type (line 3361) | static
function symbol_type (line 3368) | static
function symbol_type (line 3376) | static
function symbol_type (line 3383) | static
function symbol_type (line 3391) | static
function symbol_type (line 3398) | static
function symbol_type (line 3406) | static
function symbol_type (line 3413) | static
function symbol_type (line 3421) | static
function symbol_type (line 3428) | static
function symbol_type (line 3436) | static
function symbol_type (line 3443) | static
function symbol_type (line 3451) | static
function symbol_type (line 3458) | static
function symbol_type (line 3466) | static
function symbol_type (line 3473) | static
function symbol_type (line 3481) | static
function symbol_type (line 3488) | static
function symbol_type (line 3496) | static
function symbol_type (line 3503) | static
function symbol_type (line 3511) | static
function symbol_type (line 3518) | static
function symbol_type (line 3526) | static
function symbol_type (line 3533) | static
function symbol_type (line 3541) | static
function symbol_type (line 3548) | static
function symbol_type (line 3556) | static
function symbol_type (line 3563) | static
function symbol_type (line 3571) | static
function symbol_type (line 3578) | static
function symbol_type (line 3586) | static
function symbol_type (line 3593) | static
function symbol_type (line 3601) | static
function symbol_type (line 3608) | static
function symbol_type (line 3616) | static
function symbol_type (line 3623) | static
function symbol_type (line 3631) | static
function symbol_type (line 3638) | static
function symbol_type (line 3646) | static
function symbol_type (line 3653) | static
function symbol_type (line 3661) | static
function symbol_type (line 3668) | static
function symbol_type (line 3676) | static
function symbol_type (line 3683) | static
function symbol_type (line 3691) | static
function symbol_type (line 3698) | static
function symbol_type (line 3706) | static
function symbol_type (line 3713) | static
function symbol_type (line 3721) | static
function symbol_type (line 3728) | static
function symbol_type (line 3736) | static
function symbol_type (line 3743) | static
function symbol_type (line 3751) | static
function symbol_type (line 3758) | static
function symbol_type (line 3766) | static
function symbol_type (line 3773) | static
function symbol_type (line 3781) | static
function symbol_type (line 3788) | static
function symbol_type (line 3796) | static
function symbol_type (line 3803) | static
function symbol_type (line 3811) | static
function symbol_type (line 3818) | static
function symbol_type (line 3826) | static
function symbol_type (line 3833) | static
function symbol_type (line 3841) | static
function symbol_type (line 3848) | static
function symbol_type (line 3856) | static
function symbol_type (line 3863) | static
function symbol_type (line 3871) | static
function symbol_type (line 3878) | static
function symbol_type (line 3886) | static
function symbol_type (line 3893) | static
function symbol_type (line 3901) | static
function symbol_type (line 3908) | static
function symbol_type (line 3916) | static
function symbol_type (line 3923) | static
function symbol_type (line 3931) | static
function symbol_type (line 3938) | static
function symbol_type (line 3946) | static
function symbol_type (line 3953) | static
function symbol_type (line 3961) | static
function symbol_type (line 3968) | static
function symbol_type (line 3976) | static
function symbol_type (line 3983) | static
function symbol_type (line 3991) | static
function symbol_type (line 3998) | static
function symbol_type (line 4006) | static
function symbol_type (line 4013) | static
function symbol_type (line 4021) | static
function symbol_type (line 4028) | static
function symbol_type (line 4036) | static
function symbol_type (line 4043) | static
function symbol_type (line 4051) | static
function symbol_type (line 4058) | static
function symbol_type (line 4066) | static
function symbol_type (line 4073) | static
function symbol_type (line 4081) | static
function symbol_type (line 4088) | static
function symbol_type (line 4096) | static
function symbol_type (line 4103) | static
function symbol_type (line 4111) | static
function symbol_type (line 4118) | static
function symbol_type (line 4126) | static
function symbol_type (line 4133) | static
function symbol_type (line 4141) | static
function symbol_type (line 4148) | static
function symbol_type (line 4156) | static
function symbol_type (line 4163) | static
function symbol_type (line 4171) | static
function symbol_type (line 4178) | static
function symbol_type (line 4186) | static
function symbol_type (line 4193) | static
function symbol_type (line 4201) | static
function symbol_type (line 4208) | static
function symbol_type (line 4216) | static
function symbol_type (line 4223) | static
function symbol_type (line 4231) | static
function symbol_type (line 4238) | static
function symbol_type (line 4246) | static
function symbol_type (line 4253) | static
function symbol_type (line 4261) | static
function symbol_type (line 4268) | static
function symbol_type (line 4276) | static
function symbol_type (line 4283) | static
function symbol_type (line 4291) | static
function symbol_type (line 4298) | static
function symbol_type (line 4306) | static
function symbol_type (line 4313) | static
function symbol_type (line 4321) | static
function symbol_type (line 4328) | static
function symbol_type (line 4336) | static
function symbol_type (line 4343) | static
function symbol_type (line 4351) | static
function symbol_type (line 4358) | static
function symbol_type (line 4366) | static
function symbol_type (line 4373) | static
function symbol_type (line 4381) | static
function symbol_type (line 4388) | static
function symbol_type (line 4396) | static
function symbol_type (line 4403) | static
function symbol_type (line 4411) | static
function symbol_type (line 4418) | static
function symbol_type (line 4426) | static
function symbol_type (line 4433) | static
function symbol_type (line 4441) | static
function symbol_type (line 4448) | static
function symbol_type (line 4456) | static
function symbol_type (line 4463) | static
function symbol_type (line 4471) | static
function symbol_type (line 4478) | static
function symbol_type (line 4486) | static
function symbol_type (line 4493) | static
function symbol_type (line 4501) | static
function symbol_type (line 4508) | static
function symbol_type (line 4516) | static
function symbol_type (line 4523) | static
function symbol_type (line 4531) | static
function symbol_type (line 4538) | static
function symbol_type (line 4546) | static
function symbol_type (line 4553) | static
function symbol_type (line 4561) | static
function symbol_type (line 4568) | static
function symbol_type (line 4576) | static
function symbol_type (line 4583) | static
function symbol_type (line 4591) | static
function symbol_type (line 4598) | static
function symbol_type (line 4606) | static
function symbol_type (line 4613) | static
function symbol_type (line 4621) | static
function symbol_type (line 4628) | static
function symbol_type (line 4636) | static
function symbol_type (line 4643) | static
function symbol_type (line 4651) | static
function symbol_type (line 4658) | static
function symbol_type (line 4666) | static
function symbol_type (line 4673) | static
function symbol_type (line 4681) | static
function symbol_type (line 4688) | static
function symbol_type (line 4696) | static
function symbol_type (line 4703) | static
function symbol_type (line 4711) | static
function symbol_type (line 4718) | static
function symbol_type (line 4726) | static
function symbol_type (line 4733) | static
function symbol_type (line 4741) | static
function symbol_type (line 4748) | static
function symbol_type (line 4756) | static
function symbol_type (line 4763) | static
function symbol_type (line 4771) | static
function symbol_type (line 4778) | static
function symbol_type (line 4786) | static
function symbol_type (line 4793) | static
function symbol_type (line 4801) | static
function symbol_type (line 4808) | static
function symbol_type (line 4816) | static
function symbol_type (line 4823) | static
function symbol_type (line 4831) | static
function symbol_type (line 4838) | static
function symbol_type (line 4846) | static
function symbol_type (line 4853) | static
function symbol_type (line 4861) | static
function symbol_type (line 4868) | static
function symbol_type (line 4876) | static
function symbol_type (line 4883) | static
function symbol_type (line 4891) | static
function symbol_type (line 4898) | static
function symbol_type (line 4906) | static
function symbol_type (line 4913) | static
function symbol_type (line 4921) | static
function symbol_type (line 4928) | static
function symbol_type (line 4936) | static
function symbol_type (line 4943) | static
function symbol_type (line 4951) | static
function symbol_type (line 4958) | static
function symbol_type (line 4966) | static
function symbol_type (line 4973) | static
function symbol_type (line 4981) | static
function symbol_type (line 4988) | static
function symbol_type (line 4996) | static
function symbol_type (line 5003) | static
function symbol_type (line 5011) | static
function symbol_type (line 5018) | static
function symbol_type (line 5026) | static
function symbol_type (line 5033) | static
function symbol_type (line 5041) | static
function symbol_type (line 5048) | static
function symbol_type (line 5056) | static
function symbol_type (line 5063) | static
function symbol_type (line 5071) | static
function symbol_type (line 5078) | static
function symbol_type (line 5086) | static
function symbol_type (line 5093) | static
function symbol_type (line 5101) | static
function symbol_type (line 5108) | static
function symbol_type (line 5116) | static
function symbol_type (line 5123) | static
function symbol_type (line 5131) | static
function symbol_type (line 5138) | static
function symbol_type (line 5146) | static
function symbol_type (line 5153) | static
function symbol_type (line 5161) | static
function symbol_type (line 5168) | static
function symbol_type (line 5176) | static
function symbol_type (line 5183) | static
function symbol_type (line 5191) | static
function symbol_type (line 5198) | static
function symbol_type (line 5206) | static
function symbol_type (line 5213) | static
function symbol_type (line 5221) | static
function symbol_type (line 5228) | static
function symbol_type (line 5236) | static
function symbol_type (line 5243) | static
function symbol_type (line 5251) | static
function symbol_type (line 5258) | static
function symbol_type (line 5266) | static
function symbol_type (line 5273) | static
function symbol_type (line 5281) | static
function symbol_type (line 5288) | static
function symbol_type (line 5296) | static
function symbol_type (line 5303) | static
function symbol_type (line 5311) | static
function symbol_type (line 5318) | static
function symbol_type (line 5326) | static
function symbol_type (line 5333) | static
function symbol_type (line 5341) | static
function symbol_type (line 5348) | static
function symbol_type (line 5356) | static
function symbol_type (line 5363) | static
function symbol_type (line 5371) | static
function symbol_type (line 5378) | static
function symbol_type (line 5386) | static
function symbol_type (line 5393) | static
function symbol_type (line 5401) | static
function symbol_type (line 5408) | static
function symbol_type (line 5416) | static
function symbol_type (line 5423) | static
function symbol_type (line 5431) | static
function symbol_type (line 5438) | static
function symbol_type (line 5446) | static
function symbol_type (line 5453) | static
function symbol_type (line 5461) | static
function symbol_type (line 5468) | static
function symbol_type (line 5476) | static
function symbol_type (line 5483) | static
function symbol_type (line 5491) | static
function symbol_type (line 5498) | static
function symbol_type (line 5506) | static
function symbol_type (line 5513) | static
function symbol_type (line 5521) | static
function symbol_type (line 5528) | static
function symbol_type (line 5536) | static
function symbol_type (line 5543) | static
function symbol_type (line 5551) | static
function symbol_type (line 5558) | static
function symbol_type (line 5566) | static
function symbol_type (line 5573) | static
function symbol_type (line 5581) | static
function symbol_type (line 5588) | static
function symbol_type (line 5596) | static
function symbol_type (line 5603) | static
function symbol_type (line 5611) | static
function symbol_type (line 5618) | static
function symbol_type (line 5626) | static
function symbol_type (line 5633) | static
function symbol_type (line 5641) | static
function symbol_type (line 5648) | static
function symbol_type (line 5656) | static
function symbol_type (line 5663) | static
function symbol_type (line 5671) | static
function symbol_type (line 5678) | static
function symbol_type (line 5686) | static
function symbol_type (line 5693) | static
function symbol_type (line 5701) | static
function symbol_type (line 5708) | static
function symbol_type (line 5716) | static
function symbol_type (line 5723) | static
function symbol_type (line 5731) | static
function symbol_type (line 5738) | static
function symbol_type (line 5746) | static
function symbol_type (line 5753) | static
function symbol_type (line 5761) | static
function symbol_type (line 5768) | static
function symbol_type (line 5776) | static
function symbol_type (line 5783) | static
function symbol_type (line 5791) | static
function symbol_type (line 5798) | static
function symbol_type (line 5806) | static
function symbol_type (line 5813) | static
function symbol_type (line 5821) | static
function symbol_type (line 5828) | static
function symbol_type (line 5836) | static
function symbol_type (line 5843) | static
function symbol_type (line 5851) | static
function symbol_type (line 5858) | static
function symbol_type (line 5866) | static
function symbol_type (line 5873) | static
function symbol_type (line 5881) | static
function symbol_type (line 5888) | static
function symbol_type (line 5896) | static
function symbol_type (line 5903) | static
function symbol_type (line 5911) | static
function symbol_type (line 5918) | static
function symbol_type (line 5926) | static
function symbol_type (line 5933) | static
function symbol_type (line 5941) | static
function symbol_type (line 5948) | static
function symbol_type (line 5956) | static
function symbol_type (line 5963) | static
function symbol_type (line 5971) | static
function symbol_type (line 5978) | static
function symbol_type (line 5986) | static
function symbol_type (line 5993) | static
function symbol_type (line 6001) | static
function symbol_type (line 6008) | static
function symbol_type (line 6016) | static
function symbol_type (line 6023) | static
function symbol_type (line 6031) | static
function symbol_type (line 6038) | static
function symbol_type (line 6046) | static
function symbol_type (line 6053) | static
function symbol_type (line 6061) | static
function symbol_type (line 6068) | static
function symbol_type (line 6076) | static
function symbol_type (line 6083) | static
function symbol_type (line 6091) | static
function symbol_type (line 6098) | static
function symbol_type (line 6106) | static
function symbol_type (line 6113) | static
function symbol_type (line 6121) | static
function symbol_type (line 6128) | static
function symbol_type (line 6136) | static
function symbol_type (line 6143) | static
function symbol_type (line 6151) | static
function symbol_type (line 6158) | static
function symbol_type (line 6166) | static
function symbol_type (line 6173) | static
function symbol_type (line 6181) | static
function symbol_type (line 6188) | static
function symbol_type (line 6196) | static
function symbol_type (line 6203) | static
function symbol_type (line 6211) | static
function symbol_type (line 6218) | static
function symbol_type (line 6226) | static
function symbol_type (line 6233) | static
function symbol_type (line 6241) | static
function symbol_type (line 6248) | static
function symbol_type (line 6256) | static
function symbol_type (line 6263) | static
function symbol_type (line 6271) | static
function symbol_type (line 6278) | static
function symbol_type (line 6286) | static
function symbol_type (line 6293) | static
function symbol_type (line 6301) | static
function symbol_type (line 6308) | static
function symbol_type (line 6316) | static
function symbol_type (line 6323) | static
function symbol_type (line 6331) | static
function symbol_type (line 6338) | static
function symbol_type (line 6346) | static
function symbol_type (line 6353) | static
function symbol_type (line 6361) | static
function symbol_type (line 6368) | static
function symbol_type (line 6376) | static
function symbol_type (line 6383) | static
function symbol_type (line 6391) | static
function symbol_type (line 6398) | static
function symbol_type (line 6406) | static
function symbol_type (line 6413) | static
function symbol_type (line 6421) | static
function symbol_type (line 6428) | static
function symbol_type (line 6436) | static
function symbol_type (line 6443) | static
function symbol_type (line 6451) | static
function symbol_type (line 6458) | static
function symbol_type (line 6466) | static
function symbol_type (line 6473) | static
function symbol_type (line 6481) | static
function symbol_type (line 6488) | static
function symbol_type (line 6496) | static
function symbol_type (line 6503) | static
function symbol_type (line 6511) | static
function symbol_type (line 6518) | static
function symbol_type (line 6526) | static
function symbol_type (line 6533) | static
function symbol_type (line 6541) | static
function symbol_type (line 6548) | static
function symbol_type (line 6556) | static
function symbol_type (line 6563) | static
function symbol_type (line 6571) | static
function symbol_type (line 6578) | static
function symbol_type (line 6586) | static
function symbol_type (line 6593) | static
function symbol_type (line 6601) | static
function symbol_type (line 6608) | static
function symbol_type (line 6616) | static
function symbol_type (line 6623) | static
function symbol_type (line 6631) | static
function symbol_type (line 6638) | static
function symbol_type (line 6646) | static
function symbol_type (line 6653) | static
function symbol_type (line 6661) | static
function symbol_type (line 6668) | static
function symbol_type (line 6676) | static
function symbol_type (line 6683) | static
function symbol_type (line 6691) | static
function symbol_type (line 6698) | static
function symbol_type (line 6706) | static
function symbol_type (line 6713) | static
function symbol_type (line 6721) | static
function symbol_type (line 6728) | static
function symbol_type (line 6736) | static
function symbol_type (line 6743) | static
function symbol_type (line 6751) | static
function symbol_type (line 6758) | static
function symbol_type (line 6766) | static
function symbol_type (line 6773) | static
function symbol_type (line 6781) | static
function symbol_type (line 6788) | static
function symbol_type (line 6796) | static
function symbol_type (line 6803) | static
function symbol_type (line 6811) | static
function symbol_type (line 6818) | static
function symbol_type (line 6826) | static
function symbol_type (line 6833) | static
function symbol_type (line 6841) | static
function symbol_type (line 6848) | static
function symbol_type (line 6856) | static
function symbol_type (line 6863) | static
function symbol_type (line 6871) | static
function symbol_type (line 6878) | static
function symbol_type (line 6886) | static
function symbol_type (line 6893) | static
function symbol_type (line 6901) | static
function symbol_type (line 6908) | static
function symbol_type (line 6916) | static
function symbol_type (line 6923) | static
function symbol_type (line 6931) | static
function symbol_type (line 6938) | static
function symbol_type (line 6946) | static
function symbol_type (line 6953) | static
function symbol_type (line 6961) | static
function symbol_type (line 6968) | static
function symbol_type (line 6976) | static
function symbol_type (line 6983) | static
function symbol_type (line 6991) | static
function symbol_type (line 6998) | static
function symbol_type (line 7006) | static
function symbol_type (line 7013) | static
function symbol_type (line 7021) | static
function symbol_type (line 7028) | static
function symbol_type (line 7036) | static
function symbol_type (line 7043) | static
function symbol_type (line 7051) | static
function symbol_type (line 7058) | static
function symbol_type (line 7066) | static
function symbol_type (line 7073) | static
function symbol_type (line 7081) | static
function symbol_type (line 7088) | static
function symbol_type (line 7096) | static
function symbol_type (line 7103) | static
function symbol_type (line 7111) | static
function symbol_type (line 7118) | static
function symbol_type (line 7126) | static
function symbol_type (line 7133) | static
function symbol_type (line 7141) | static
function symbol_type (line 7148) | static
function symbol_type (line 7156) | static
function symbol_type (line 7163) | static
function symbol_type (line 7171) | static
function symbol_type (line 7178) | static
function symbol_type (line 7186) | static
function symbol_type (line 7193) | static
function symbol_type (line 7201) | static
function symbol_type (line 7208) | static
function symbol_type (line 7216) | static
function symbol_type (line 7223) | static
function symbol_type (line 7231) | static
function symbol_type (line 7238) | static
function symbol_type (line 7246) | static
function symbol_type (line 7253) | static
function symbol_type (line 7261) | static
function symbol_type (line 7268) | static
function symbol_type (line 7276) | static
function symbol_type (line 7283) | static
function symbol_type (line 7291) | static
function symbol_type (line 7298) | static
function symbol_type (line 7306) | static
function symbol_type (line 7313) | static
function symbol_type (line 7321) | static
function symbol_type (line 7328) | static
function symbol_type (line 7336) | static
function symbol_type (line 7343) | static
function symbol_type (line 7351) | static
function symbol_type (line 7358) | static
function symbol_type (line 7366) | static
function symbol_type (line 7373) | static
function symbol_type (line 7381) | static
function symbol_type (line 7388) | static
function symbol_type (line 7396) | static
function symbol_type (line 7403) | static
function symbol_type (line 7411) | static
function symbol_type (line 7418) | static
function symbol_type (line 7426) | static
function symbol_type (line 7433) | static
function symbol_type (line 7441) | static
function symbol_type (line 7448) | static
function symbol_type (line 7456) | static
function symbol_type (line 7463) | static
function symbol_type (line 7471) | static
function symbol_type (line 7478) | static
function symbol_type (line 7486) | static
function symbol_type (line 7493) | static
function symbol_type (line 7501) | static
function symbol_type (line 7508) | static
function symbol_type (line 7516) | static
function symbol_type (line 7523) | static
function symbol_type (line 7531) | static
function symbol_type (line 7538) | static
function symbol_type (line 7546) | static
function symbol_type (line 7553) | static
function symbol_type (line 7561) | static
function symbol_type (line 7568) | static
function symbol_type (line 7576) | static
function symbol_type (line 7583) | static
function symbol_type (line 7591) | static
function symbol_type (line 7598) | static
function symbol_type (line 7606) | static
function symbol_type (line 7613) | static
function symbol_type (line 7621) | static
function symbol_type (line 7628) | static
function symbol_type (line 7636) | static
function symbol_type (line 7643) | static
function symbol_type (line 7651) | static
function symbol_type (line 7658) | static
function symbol_type (line 7666) | static
function symbol_type (line 7673) | static
function symbol_type (line 7681) | static
function symbol_type (line 7688) | static
function symbol_type (line 7696) | static
function symbol_type (line 7703) | static
function symbol_type (line 7711) | static
function symbol_type (line 7718) | static
function symbol_type (line 7726) | static
function symbol_type (line 7733) | static
function symbol_type (line 7741) | static
function symbol_type (line 7748) | static
function symbol_type (line 7756) | static
function symbol_type (line 7763) | static
function symbol_type (line 7771) | static
function symbol_type (line 7778) | static
function symbol_type (line 7786) | static
function symbol_type (line 7793) | static
function symbol_type (line 7801) | static
function symbol_type (line 7808) | static
function symbol_type (line 7816) | static
function symbol_type (line 7823) | static
function symbol_type (line 7831) | static
function symbol_type (line 7838) | static
function symbol_type (line 7846) | static
function symbol_type (line 7853) | static
function symbol_type (line 7861) | static
function symbol_type (line 7868) | static
function symbol_type (line 7876) | static
function symbol_type (line 7883) | static
class context (line 7892) | class context
method symbol_type (line 7896) | const symbol_type& lookahead () const YY_NOEXCEPT { return yyla_; }
method symbol_kind_type (line 7897) | symbol_kind_type token () const YY_NOEXCEPT { return yyla_.kind (); }
method location_type (line 7898) | const location_type& location () const YY_NOEXCEPT { return yyla_.loca...
type by_state (line 8020) | struct by_state
type stack_symbol_type (line 8054) | struct stack_symbol_type : basic_symbol<by_state>
class stack (line 8077) | class stack
method stack (line 8086) | stack (size_type n = 200) YY_NOEXCEPT
method stack (line 8092) | stack (const stack&) = delete;
method stack (line 8094) | stack& operator= (const stack&) = delete;
method T (line 8100) | const T&
method T (line 8109) | T&
method push (line 8118) | void
method pop (line 8126) | void
method index_type (line 8141) | index_type
method const_iterator (line 8148) | const_iterator
method const_iterator (line 8155) | const_iterator
class slice (line 8162) | class slice
method slice (line 8165) | slice (const stack& stack, index_type range) YY_NOEXCEPT
method T (line 8170) | const T&
FILE: src/parser/seclang-scanner.cc
type yy_buffer_state (line 189) | struct yy_buffer_state
type yy_buffer_state (line 231) | struct yy_buffer_state
type yy_trans_info (line 441) | struct yy_trans_info
function yy_get_next_buffer (line 8641) | static int yy_get_next_buffer (void)
function yy_state_type (line 8784) | static yy_state_type yy_get_previous_state (void)
function yy_state_type (line 8822) | static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
function yyrestart (line 8943) | void yyrestart (FILE * input_file )
function yy_switch_to_buffer (line 8967) | void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
function yy_load_buffer_state (line 9002) | static void yy_load_buffer_state (void)
function YY_BUFFER_STATE (line 9024) | YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
function yy_delete_buffer (line 9059) | void yy_delete_buffer (YY_BUFFER_STATE b )
function yy_init_buffer (line 9082) | static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
function yy_flush_buffer (line 9123) | void yy_flush_buffer (YY_BUFFER_STATE b )
function yypush_buffer_state (line 9157) | void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
function yypop_buffer_state (line 9193) | void yypop_buffer_state (void)
function yyensure_buffer_stack (line 9218) | static void yyensure_buffer_stack (void)
function YY_BUFFER_STATE (line 9272) | YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
function YY_BUFFER_STATE (line 9311) | YY_BUFFER_STATE yy_scan_string (const char * yystr )
function YY_BUFFER_STATE (line 9326) | YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybyte...
function yyget_lineno (line 9397) | int yyget_lineno (void)
function FILE (line 9406) | FILE *yyget_in (void)
function FILE (line 9414) | FILE *yyget_out (void)
function yy_size_t (line 9422) | yy_size_t yyget_leng (void)
function yyset_lineno (line 9443) | void yyset_lineno (int _line_number )
function yyset_in (line 9455) | void yyset_in (FILE * _in_str )
function yyset_out (line 9460) | void yyset_out (FILE * _out_str )
function yyget_debug (line 9465) | int yyget_debug (void)
function yyset_debug (line 9470) | void yyset_debug (int _bdebug )
function yy_init_globals (line 9483) | static int yy_init_globals (void)
function yylex_destroy (line 9514) | int yylex_destroy (void)
function yy_flex_strncpy (line 9543) | static void yy_flex_strncpy (char* s1, const char * s2, int n )
function yy_flex_strlen (line 9553) | static int yy_flex_strlen (const char * s )
function yyfree (line 9581) | void yyfree (void * ptr )
type modsecurity (line 9596) | namespace modsecurity {
FILE: src/request_body_processor/json.cc
type modsecurity (line 26) | namespace modsecurity {
type RequestBodyProcessor (line 27) | namespace RequestBodyProcessor {
FILE: src/request_body_processor/json.h
function namespace (line 32) | namespace modsecurity {
FILE: src/request_body_processor/multipart.cc
type tm (line 70) | struct tm
FILE: src/request_body_processor/multipart.h
function namespace (line 27) | namespace modsecurity {
function class (line 57) | class MultipartPartTmpFile {
function class (line 89) | class MultipartPart {
function class (line 150) | class Multipart {
FILE: src/request_body_processor/xml.cc
type modsecurity (line 23) | namespace modsecurity {
type RequestBodyProcessor (line 24) | namespace RequestBodyProcessor {
class MSCSAXHandler (line 54) | class MSCSAXHandler {
method onStartElement (line 56) | void onStartElement(void * ctx, const xmlChar *localname) {
method onEndElement (line 82) | void onEndElement(void * ctx, const xmlChar *localname) {
method onCharacters (line 105) | void onCharacters(void *ctx, const xmlChar *ch, int len) {
function MSC_startElement (line 122) | void MSC_startElement(void *userData,
function MSC_endElement (line 136) | void MSC_endElement(
function MSC_xmlcharacters (line 146) | void MSC_xmlcharacters(void *userData, const xmlChar *ch, int len) {
function xmlParserInputBufferPtr (line 211) | xmlParserInputBufferPtr XML::unloadExternalEntity(const char *URI,
FILE: src/request_body_processor/xml.h
function namespace (line 32) | namespace modsecurity {
FILE: src/rule_message.cc
type modsecurity (line 23) | namespace modsecurity {
FILE: src/rule_script.cc
type modsecurity (line 19) | namespace modsecurity {
FILE: src/rule_script.h
function namespace (line 40) | namespace modsecurity {
FILE: src/rule_unconditional.cc
type modsecurity (line 19) | namespace modsecurity {
FILE: src/rule_with_actions.cc
type modsecurity (line 49) | namespace modsecurity {
FILE: src/rule_with_operator.cc
type modsecurity (line 46) | namespace modsecurity {
function getVariablesExceptionsHelper (line 124) | void getVariablesExceptionsHelper(
FILE: src/rules_exceptions.cc
type modsecurity (line 23) | namespace modsecurity {
FILE: src/rules_set.cc
type modsecurity (line 32) | namespace modsecurity {
function RulesSet (line 277) | RulesSet *msc_create_rules_set(void) {
function msc_rules_dump (line 282) | void msc_rules_dump(const RulesSet *rules) {
function msc_rules_merge (line 287) | int msc_rules_merge(RulesSet *rules_dst,
function msc_rules_add_remote (line 297) | int msc_rules_add_remote(RulesSet *rules,
function msc_rules_add_file (line 307) | int msc_rules_add_file(RulesSet *rules, const char *file,
function msc_rules_add (line 317) | int msc_rules_add(RulesSet *rules, const char *plain_rules,
function msc_rules_error_cleanup (line 337) | void msc_rules_error_cleanup(const char *error) {
function msc_rules_cleanup (line 342) | int msc_rules_cleanup(RulesSet *rules) {
FILE: src/rules_set_phases.cc
type modsecurity (line 29) | namespace modsecurity {
FILE: src/rules_set_properties.cc
type modsecurity (line 26) | namespace modsecurity {
FILE: src/run_time_string.cc
type modsecurity (line 30) | namespace modsecurity {
FILE: src/run_time_string.h
function namespace (line 33) | namespace modsecurity {
FILE: src/transaction.cc
function get_id (line 106) | static std::string get_id(const char *id, const time_t timestamp) {
type tm (line 1396) | struct tm
type tm (line 1458) | struct tm
function Transaction (line 1817) | Transaction *msc_new_transaction(ModSecurity *ms,
function Transaction (line 1821) | Transaction *msc_new_transaction_with_id(ModSecurity *ms,
function msc_process_connection (line 1847) | int msc_process_connection(Transaction *transaction,
function msc_process_uri (line 1876) | int msc_process_uri(Transaction *transaction, const char *uri,
function msc_process_request_headers (line 1898) | int msc_process_request_headers(Transaction *transaction) {
function msc_process_request_body (line 1922) | int msc_process_request_body(Transaction *transaction) {
function msc_append_request_body (line 1953) | int msc_append_request_body(Transaction *transaction,
function msc_request_body_from_file (line 1959) | int msc_request_body_from_file(Transaction *transaction,
function msc_process_response_headers (line 1981) | int msc_process_response_headers(Transaction *transaction,
function msc_process_response_body (line 2006) | int msc_process_response_body(Transaction *transaction) {
function msc_append_response_body (line 2031) | int msc_append_response_body(Transaction *transaction,
function msc_add_request_header (line 2055) | int msc_add_request_header(Transaction *transaction,
function msc_add_n_request_header (line 2080) | int msc_add_n_request_header(Transaction *transaction,
function msc_add_response_header (line 2106) | int msc_add_response_header(Transaction *transaction,
function msc_add_n_response_header (line 2131) | int msc_add_n_response_header(Transaction *transaction,
function msc_transaction_cleanup (line 2148) | void msc_transaction_cleanup(Transaction *transaction) {
function msc_intervention (line 2171) | int msc_intervention(Transaction *transaction,
function msc_intervention_cleanup (line 2187) | void msc_intervention_cleanup(ModSecurityIntervention *it) {
function msc_get_response_body_length (line 2224) | size_t msc_get_response_body_length(Transaction *transaction) {
function msc_get_request_body_length (line 2239) | size_t msc_get_request_body_length(Transaction *transaction) {
function msc_process_logging (line 2257) | int msc_process_logging(Transaction *transaction) {
function msc_update_status_code (line 2276) | int msc_update_status_code(Transaction *transaction, int status) {
function msc_set_request_hostname (line 2322) | int msc_set_request_hostname(Transaction *transaction,
FILE: src/unique_id.cc
type modsecurity (line 61) | namespace modsecurity {
type utsname (line 96) | struct utsname
type ifaddrs (line 117) | struct ifaddrs
type ifaddrs (line 118) | struct ifaddrs
type sockaddr_dl (line 127) | struct sockaddr_dl
type sockaddr_dl (line 127) | struct sockaddr_dl
type ifconf (line 145) | struct ifconf
type ifreq (line 147) | struct ifreq
type ifreq (line 152) | struct ifreq
FILE: src/unique_id.h
function namespace (line 27) | namespace modsecurity {
FILE: src/utils/acmp.cc
function acmp_strlen (line 55) | static size_t acmp_strlen(ACMP *parser, const char *str) {
function acmp_strtoucs (line 65) | static void acmp_strtoucs(ACMP *parser, const char *str, long *ucs_chars...
function acmp_node_t (line 76) | static acmp_node_t *acmp_child_for_code(acmp_node_t *parent_node, long u...
function acmp_add_node_to_parent (line 89) | static void acmp_add_node_to_parent(acmp_node_t *parent, acmp_node_t *ch...
function acmp_clone_node_no_state (line 113) | static void acmp_clone_node_no_state(acmp_node_t *from, acmp_node_t *to) {
function acmp_node_t (line 121) | static inline acmp_node_t *acmp_btree_find(acmp_node_t *node, long lette...
function acmp_node_t (line 137) | static inline acmp_node_t *acmp_goto(acmp_node_t *node, long letter) {
function acmp_connect_other_matches (line 144) | static void acmp_connect_other_matches(ACMP *parser, acmp_node_t *node) {
function acmp_add_btree_leaves (line 166) | static void acmp_add_btree_leaves(acmp_btree_node_t *node, acmp_node_t *...
function acmp_build_binary_tree (line 209) | static void acmp_build_binary_tree(ACMP *parser, acmp_node_t *node) {
function acmp_connect_fail_branches (line 262) | static int acmp_connect_fail_branches(ACMP *parser) {
function ACMP (line 324) | ACMP *acmp_create(int flags) {
function acmp_prepare (line 338) | int acmp_prepare(ACMP *parser) {
function acmp_add_pattern (line 363) | int acmp_add_pattern(ACMP *parser, const char *pattern,
function acmp_process_quick (line 417) | int acmp_process_quick(ACMPT *acmpt, const char **match, const char *dat...
FILE: src/utils/acmp.h
type ACMP (line 33) | typedef struct ACMP ACMP;
type ACMPT (line 38) | typedef struct {
type acmp_node_t (line 62) | typedef struct acmp_node_t acmp_node_t;
type acmp_btree_node_t (line 63) | typedef struct acmp_btree_node_t acmp_btree_node_t;
type acmp_node_t (line 64) | struct acmp_node_t {
type acmp_btree_node_t (line 85) | struct acmp_btree_node_t {
type ACMP (line 95) | struct ACMP {
FILE: src/utils/base64.cc
function base64Helper (line 27) | inline std::string base64Helper(const char *data, const unsigned int len...
type modsecurity (line 44) | namespace modsecurity {
type Utils (line 45) | namespace Utils {
FILE: src/utils/base64.h
function namespace (line 22) | namespace modsecurity {
FILE: src/utils/decode.cc
type modsecurity::utils (line 22) | namespace modsecurity::utils {
function urldecode_nonstrict_inplace (line 25) | bool urldecode_nonstrict_inplace(std::string &val,
function uri_decode (line 77) | std::string uri_decode(const std::string & sSrc) {
FILE: src/utils/decode.h
function namespace (line 28) | namespace modsecurity {
FILE: src/utils/geo_lookup.cc
type modsecurity (line 35) | namespace modsecurity {
type Utils (line 36) | namespace Utils {
FILE: src/utils/geo_lookup.h
function namespace (line 33) | namespace modsecurity {
FILE: src/utils/https_client.cc
type modsecurity (line 39) | namespace modsecurity {
type Utils (line 40) | namespace Utils {
type curl_slist (line 79) | struct curl_slist
FILE: src/utils/https_client.h
function namespace (line 30) | namespace modsecurity {
FILE: src/utils/ip_tree.cc
type modsecurity (line 34) | namespace modsecurity {
type Utils (line 35) | namespace Utils {
FILE: src/utils/ip_tree.h
function namespace (line 27) | namespace modsecurity {
FILE: src/utils/md5.h
function namespace (line 23) | namespace modsecurity::Utils {
FILE: src/utils/msc_tree.cc
function CPTTree (line 32) | CPTTree *CPTCreateRadixTree() {
function ConvertIPNetmask (line 45) | void ConvertIPNetmask(unsigned char *buffer, unsigned char netmask, unsi...
function TreeNode (line 68) | TreeNode *CPTCreateNode() {
function CPTData (line 80) | CPTData *CPTCreateCPTData(unsigned char netmask) {
function TreePrefix (line 95) | TreePrefix *InsertDataPrefix(TreePrefix *prefix, unsigned char *ipdata, ...
function TreePrefix (line 112) | TreePrefix *CPTCreatePrefix(unsigned char *ipdata, unsigned int ip_bitmask,
function CPTAppendToCPTDataList (line 140) | void CPTAppendToCPTDataList(CPTData *n, CPTData **list) {
function TreePrefixContainNetmask (line 172) | int TreePrefixContainNetmask(TreePrefix *prefix, unsigned char netmask) {
function CheckBitmask (line 190) | int CheckBitmask(unsigned char netmask, unsigned int ip_bitmask) {
function TreeNode (line 209) | TreeNode *CPTCreateHead(TreePrefix *prefix, TreeNode *node, CPTTree *tre...
function TreeNode (line 241) | TreeNode *SetParentNode(TreeNode *node, TreeNode *new_node, CPTTree *tre...
function InsertNetmask (line 253) | int InsertNetmask(TreeNode *node, TreeNode *parent, TreeNode *new_node,
function TreeNode (line 298) | TreeNode *CPTAddElement(unsigned char *ipdata, unsigned int ip_bitmask, ...
function TreeCheckData (line 537) | int TreeCheckData(TreePrefix *prefix, CPTData *prefix_data, unsigned int...
function TreePrefixNetmask (line 549) | int TreePrefixNetmask(TreePrefix *prefix, unsigned int netmask, int flag...
function TreeNode (line 588) | TreeNode *CPTRetriveNode(unsigned char *buffer, unsigned int ip_bitmask,...
function TreeNode (line 625) | TreeNode *CPTRetriveParentNode(TreeNode *node) {
function TreeNode (line 633) | TreeNode *CPTFindElementIPNetblock(unsigned char *ipdata, unsigned char ...
function TreeNode (line 720) | TreeNode *CPTFindElement(unsigned char *ipdata, unsigned int ip_bitmask,...
function TreeNode (line 800) | TreeNode *CPTIpMatch(unsigned char *ipdata, CPTTree *tree, int type) {
function TreeNode (line 835) | TreeNode *TreeAddIP(const char *buffer, CPTTree *tree, int type) {
function tree_contains_ip (line 941) | int tree_contains_ip(TreeRoot *rtree,
function add_ip_from_param (line 983) | int add_ip_from_param(
function ip_tree_from_param (line 1019) | int ip_tree_from_param(
function is_netmask_v4 (line 1067) | unsigned char is_netmask_v4(char *ip_strv4) {
function is_netmask_v6 (line 1102) | unsigned char is_netmask_v6(char *ip_strv6) {
function create_radix_tree (line 1128) | int create_radix_tree(TreeRoot **rtree, char **error_msg)
FILE: src/utils/msc_tree.h
type CPTData (line 27) | typedef struct CPTData CPTData;
type TreePrefix (line 28) | typedef struct TreePrefix TreePrefix;
type TreeNode (line 29) | typedef struct TreeNode TreeNode;
type CPTTree (line 30) | typedef struct CPTTree CPTTree;
type TreeRoot (line 31) | typedef struct TreeRoot TreeRoot;
type CPTData (line 58) | struct CPTData {
type TreePrefix (line 63) | struct TreePrefix {
type TreeNode (line 69) | struct TreeNode {
type CPTTree (line 78) | struct CPTTree {
type TreeRoot (line 83) | struct TreeRoot {
FILE: src/utils/phase.h
function namespace (line 26) | namespace modsecurity {
FILE: src/utils/random.cc
type modsecurity (line 25) | namespace modsecurity {
type utils (line 26) | namespace utils {
function random_number (line 29) | double random_number(const double from, const double to) {
function generate_transaction_unique_id (line 38) | double generate_transaction_unique_id() {
FILE: src/utils/random.h
function namespace (line 27) | namespace modsecurity {
FILE: src/utils/regex.cc
class Pcre2MatchContextPtr (line 39) | class Pcre2MatchContextPtr {
method Pcre2MatchContextPtr (line 41) | Pcre2MatchContextPtr()
method Pcre2MatchContextPtr (line 44) | Pcre2MatchContextPtr(const Pcre2MatchContextPtr&) = delete;
method Pcre2MatchContextPtr (line 45) | Pcre2MatchContextPtr& operator=(const Pcre2MatchContextPtr&) = delete;
function crlfIsNewline (line 64) | bool crlfIsNewline() {
FILE: src/utils/regex.h
function namespace (line 33) | namespace Utils {
FILE: src/utils/sha1.h
function namespace (line 25) | namespace modsecurity::Utils {
FILE: src/utils/shared_files.cc
type modsecurity (line 24) | namespace modsecurity {
type utils (line 25) | namespace utils {
type flock (line 117) | struct flock
FILE: src/utils/shared_files.h
function namespace (line 29) | namespace modsecurity {
FILE: src/utils/string.h
function namespace (line 33) | namespace modsecurity::utils::string {
function std (line 150) | inline std::vector<std::string> split(const std::string &str, char delim...
function chomp (line 161) | inline void chomp(std::string &str) {
function replaceAll (line 169) | inline void replaceAll(std::string &str, std::string_view from,
function std (line 179) | inline std::string removeWhiteSpacesIfNeeded(std::string a) {
function std (line 190) | inline std::string removeBracketsIfNeeded(std::string a) {
function std (line 203) | inline std::string parserSanitizer(std::string a) {
function xsingle2c (line 213) | inline unsigned char xsingle2c(const unsigned char *what) {
function x2c (line 222) | inline unsigned char x2c(const unsigned char *what) {
function std (line 244) | inline std::string string_to_hex(std::string_view input) {
FILE: src/utils/system.cc
function clock_gettime (line 57) | static int clock_gettime(int clock_id, struct timespec *tp)
function cpu_seconds (line 81) | double cpu_seconds(void) {
function find_resource (line 99) | std::string find_resource(const std::string& resource,
function get_path (line 138) | std::string get_path(const std::string& file) {
function createDir (line 188) | bool createDir(const std::string& dir, int mode, std::string *error) {
function isFile (line 206) | bool isFile(const std::string& f) {
FILE: src/utils/system.h
function namespace (line 25) | namespace modsecurity {
FILE: src/variables/args.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/args_combined_size.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/args_get.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/args_get_names.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/args_names.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/args_post.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/args_post_names.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/auth_type.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/duration.cc
type modsecurity (line 27) | namespace modsecurity {
type variables (line 28) | namespace variables {
FILE: src/variables/duration.h
function namespace (line 26) | namespace modsecurity {
FILE: src/variables/env.cc
type modsecurity (line 38) | namespace modsecurity {
type variables (line 39) | namespace variables {
FILE: src/variables/env.h
function namespace (line 26) | namespace modsecurity {
FILE: src/variables/files.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/files_combined_size.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/files_names.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/files_sizes.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/files_tmp_content.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/files_tmp_names.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/full_request.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/full_request_length.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/geo.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/global.h
function namespace (line 28) | namespace modsecurity {
FILE: src/variables/highest_severity.cc
type modsecurity (line 26) | namespace modsecurity {
type variables (line 27) | namespace variables {
FILE: src/variables/highest_severity.h
function namespace (line 26) | namespace modsecurity {
FILE: src/variables/inbound_data_error.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/ip.h
function namespace (line 28) | namespace modsecurity {
FILE: src/variables/matched_var.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/matched_var_name.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/matched_vars.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/matched_vars_names.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/modsec_build.cc
type modsecurity (line 24) | namespace modsecurity {
type variables (line 25) | namespace variables {
FILE: src/variables/modsec_build.h
function namespace (line 28) | namespace modsecurity {
FILE: src/variables/msc_pcre_error.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/msc_pcre_limits_exceeded.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/multipart_boundary_quoted.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/multipart_boundary_whitespace.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/multipart_crlf_lf_lines.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/multipart_data_after.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/multipart_data_before.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/multipart_file_limit_exceeded.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/multipart_file_name.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/multipart_header_folding.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/multipart_invalid_header_folding.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/multipart_invalid_part.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/multipart_invalid_quoting.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/multipart_lf_line.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/multipart_missing_semicolon.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/multipart_name.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/multipart_part_headers.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/multipart_strict_error.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/multipart_unmatched_boundary.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/outbound_data_error.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/path_info.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/query_string.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/remote_addr.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/remote_host.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/remote_port.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/remote_user.cc
type modsecurity (line 35) | namespace modsecurity {
type variables (line 36) | namespace variables {
FILE: src/variables/remote_user.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/reqbody_error.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/reqbody_error_msg.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/reqbody_processor.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/reqbody_processor_error.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/reqbody_processor_error_msg.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/request_base_name.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/request_body.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/request_body_length.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/request_cookies.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/request_cookies_names.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/request_file_name.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/request_headers.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/request_headers_names.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/request_line.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/request_method.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/request_protocol.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/request_uri.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/request_uri_raw.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/resource.h
function namespace (line 28) | namespace modsecurity {
FILE: src/variables/response_body.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/response_content_length.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/response_content_type.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/response_headers.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/response_headers_names.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/response_protocol.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/response_status.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/rule.cc
type modsecurity (line 19) | namespace modsecurity {
type variables (line 20) | namespace variables {
FILE: src/variables/rule.h
function namespace (line 29) | namespace modsecurity {
FILE: src/variables/server_addr.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/server_name.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/server_port.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/session.h
function namespace (line 28) | namespace modsecurity {
FILE: src/variables/session_id.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/status.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/time.cc
type modsecurity (line 37) | namespace modsecurity {
type variables (line 38) | namespace variables {
type tm (line 46) | struct tm
FILE: src/variables/time.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/time_day.cc
type modsecurity (line 37) | namespace modsecurity {
type variables (line 38) | namespace variables {
type tm (line 46) | struct tm
FILE: src/variables/time_day.h
function namespace (line 26) | namespace modsecurity {
FILE: src/variables/time_epoch.cc
type modsecurity (line 33) | namespace modsecurity {
type variables (line 34) | namespace variables {
FILE: src/variables/time_epoch.h
function namespace (line 26) | namespace modsecurity {
FILE: src/variables/time_hour.cc
type modsecurity (line 37) | namespace modsecurity {
type variables (line 38) | namespace variables {
type tm (line 46) | struct tm
FILE: src/variables/time_hour.h
function namespace (line 26) | namespace modsecurity {
FILE: src/variables/time_min.cc
type modsecurity (line 37) | namespace modsecurity {
type variables (line 38) | namespace variables {
type tm (line 46) | struct tm
FILE: src/variables/time_min.h
function namespace (line 26) | namespace modsecurity {
FILE: src/variables/time_mon.cc
type modsecurity (line 37) | namespace modsecurity {
type variables (line 38) | namespace variables {
type tm (line 46) | struct tm
FILE: src/variables/time_mon.h
function namespace (line 26) | namespace modsecurity {
FILE: src/variables/time_sec.cc
type modsecurity (line 37) | namespace modsecurity {
type variables (line 38) | namespace variables {
type tm (line 46) | struct tm
FILE: src/variables/time_sec.h
function namespace (line 26) | namespace modsecurity {
FILE: src/variables/time_wday.cc
type modsecurity (line 37) | namespace modsecurity {
type variables (line 38) | namespace variables {
type tm (line 46) | struct tm
FILE: src/variables/time_wday.h
function namespace (line 26) | namespace modsecurity {
FILE: src/variables/time_year.cc
type modsecurity (line 37) | namespace modsecurity {
type variables (line 38) | namespace variables {
type tm (line 46) | struct tm
FILE: src/variables/time_year.h
function namespace (line 26) | namespace modsecurity {
FILE: src/variables/tx.cc
type modsecurity (line 33) | namespace modsecurity {
type variables (line 34) | namespace variables {
FILE: src/variables/tx.h
function namespace (line 29) | namespace modsecurity {
FILE: src/variables/unique_id.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/url_encoded_error.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/user.h
function namespace (line 28) | namespace modsecurity {
FILE: src/variables/user_id.h
function namespace (line 27) | namespace modsecurity {
FILE: src/variables/variable.cc
type modsecurity (line 27) | namespace modsecurity {
type variables (line 28) | namespace variables {
FILE: src/variables/variable.h
function namespace (line 102) | namespace modsecurity {
FILE: src/variables/web_app_id.h
function namespace (line 28) | namespace modsecurity {
FILE: src/variables/xml.cc
type modsecurity (line 46) | namespace modsecurity {
type variables (line 47) | namespace variables {
FILE: src/variables/xml.h
function namespace (line 28) | namespace modsecurity {
FILE: test/benchmark/benchmark.cc
function main (line 47) | int main(int argc, const char *argv[]) {
FILE: test/common/custom_debug_log.cc
type modsecurity_test (line 24) | namespace modsecurity_test {
FILE: test/common/custom_debug_log.h
function namespace (line 24) | namespace modsecurity_test {
FILE: test/common/modsecurity_test.cc
type modsecurity_test (line 33) | namespace modsecurity_test {
type dirent (line 99) | struct dirent
type stat (line 100) | struct stat
FILE: test/common/modsecurity_test.h
function m_test_number (line 45) | int m_test_number{0}
function m_format (line 49) | bool m_format{false};
FILE: test/common/modsecurity_test_context.h
function namespace (line 11) | namespace modsecurity_test {
FILE: test/common/modsecurity_test_results.h
function namespace (line 23) | namespace modsecurity_test {
FILE: test/fuzzer/afl_fuzzer.cc
function op_test (line 125) | inline void op_test(const std::string &opName, const std::string &s) {
function main (line 132) | int main(int argc, char** argv) {
FILE: test/optimization/optimization.cc
function print_help (line 34) | void print_help() {
function main (line 41) | int main(int argc, char **argv) {
FILE: test/regression/regression.cc
function print_help (line 54) | void print_help() {
function contains (line 60) | bool contains(const std::string &s, const std::string &pattern) {
function clearAuditLog (line 67) | void clearAuditLog(const std::string &filename) {
function getAuditLogContent (line 76) | std::string getAuditLogContent(const std::string &filename) {
function actions (line 90) | void actions(ModSecurityTestResults<RegressionTest> *r,
function perform_unit_test (line 115) | void perform_unit_test(const ModSecurityTest<RegressionTest> &test,
function main (line 395) | int main(int argc, char **argv)
FILE: test/regression/regression_test.cc
type modsecurity_test (line 30) | namespace modsecurity_test {
function set_int_from_yajl (line 88) | static inline void set_int_from_yajl(int &dest, std::string_view want_...
function set_opt_int_from_yajl (line 94) | static inline void set_opt_int_from_yajl(std::optional<int> &dest, std...
function set_string_from_yajl (line 100) | static inline void set_string_from_yajl(std::string &dest, std::string...
function ascii_tolower (line 230) | constexpr char ascii_tolower(char c) {
function iequals_ascii (line 234) | bool iequals_ascii(std::string_view a, std::string_view b) {
function has_chunked_header (line 242) | static bool has_chunked_header(const std::vector<std::pair<std::string...
function update_content_length (line 250) | static void update_content_length(std::vector<std::pair<std::string, s...
function yajl_gen_status (line 290) | static yajl_gen_status gen_string_view(yajl_gen g, std::string_view s) {
function yajl_gen_status (line 294) | static yajl_gen_status gen_key_str(yajl_gen g, std::string_view key, s...
function yajl_gen_status (line 301) | static yajl_gen_status gen_key_str_if_non_empty(yajl_gen g, std::strin...
function yajl_gen_status (line 308) | static yajl_gen_status gen_key_int(yajl_gen g, std::string_view key, i...
function yajl_gen_status (line 315) | static yajl_gen_status gen_key_opt_int(yajl_gen g, std::string_view ke...
function yajl_gen_status (line 322) | static yajl_gen_status gen_key_int_if_non_zero(yajl_gen g, std::string...
function yajl_gen_status (line 329) | static yajl_gen_status gen_key_number(yajl_gen g, std::string_view key...
function yajl_gen_status (line 336) | static yajl_gen_status gen_key_str_array(yajl_gen g, std::string_view ...
function yajl_gen_status (line 351) | static yajl_gen_status gen_key_headers(yajl_gen g, std::string_view ke...
FILE: test/regression/regression_test.h
function namespace (line 30) | namespace modsecurity_test {
FILE: test/unit/unit.cc
function print_help (line 53) | void print_help() {
type OperatorTest (line 60) | struct OperatorTest {
method ItemType (line 63) | static ItemType* init(const UnitTest &t) {
method UnitTestResult (line 73) | static UnitTestResult eval(ItemType &op, const UnitTest &t, modsecurit...
method check (line 79) | static bool check(const UnitTestResult &result, const UnitTest &t) {
type TransformationTest (line 85) | struct TransformationTest {
method ItemType (line 88) | static ItemType* init(const UnitTest &t) {
method UnitTestResult (line 95) | static UnitTestResult eval(const ItemType &tfn, const UnitTest &t, con...
method check (line 101) | static bool check(const UnitTestResult &result, const UnitTest &t) {
function UnitTestResult (line 108) | UnitTestResult perform_unit_test_once(const UnitTest &t, modsecurity::Tr...
function UnitTestResult (line 117) | UnitTestResult perform_unit_test_multithreaded(const UnitTest &t, modsec...
function perform_unit_test_helper (line 155) | void perform_unit_test_helper(const ModSecurityTest<UnitTest> &test, Uni...
function perform_unit_test (line 174) | void perform_unit_test(const ModSecurityTest<UnitTest> &test, UnitTest &t,
function main (line 217) | int main(int argc, char **argv) {
FILE: test/unit/unit_test.cc
type modsecurity_test (line 31) | namespace modsecurity_test {
function replaceAll (line 34) | void replaceAll(std::string *s, const std::string &search,
function json2bin (line 47) | void json2bin(std::string *str) {
FILE: test/unit/unit_test.h
function namespace (line 26) | namespace modsecurity_test {
FILE: tools/rules-check/rules-check.cc
function print_help (line 32) | void print_help(const char *name) {
function main (line 38) | int main(int argc, char **argv) {
Condensed preview — 819 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4,516K chars).
[
{
"path": ".editorconfig",
"chars": 562,
"preview": "# top-most EditorConfig file\nroot = true\n\n# Unix-style newlines with a newline ending every file\n[*]\nend_of_line = lf\nin"
},
{
"path": ".github/ISSUE_TEMPLATE/bug-report-for-version-2-x.md",
"chars": 1331,
"preview": "---\nname: Bug report for version 2.x\nabout: Create a report to help us improve\ntitle: ''\nlabels: '2.x'\nassignees: ''\n\n--"
},
{
"path": ".github/ISSUE_TEMPLATE/bug-report-for-version-3-x.md",
"chars": 1453,
"preview": "---\nname: Bug report for version 3.x\nabout: Create a report to help us improve. If you don't know a specific detail or\n "
},
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 782,
"preview": "<!-- Thank you for contributing to OWASP ModSecurity, your effort is greatly appreciated -->\n<!-- Please help us by addi"
},
{
"path": ".github/workflows/ci.yml",
"chars": 8482,
"preview": "name: Quality Assurance\n\non:\n push:\n pull_request:\n\njobs:\n build-linux:\n name: Linux (${{ matrix.platform.label }}"
},
{
"path": ".github/workflows/ci_new.yml",
"chars": 8541,
"preview": "name: Quality Assurance new\n\non:\n push:\n pull_request:\n\njobs:\n build-linux:\n name: Linux (${{ matrix.platform.labe"
},
{
"path": ".gitignore",
"chars": 1013,
"preview": "*.o\n*.lo\n*.la\n**/Makefile\n**/Makefile.in\naclocal.m4\nar-lib\nautom4te.cache/\nbuild/libtool.m4\nbuild/ltoptions.m4\nbuild/lts"
},
{
"path": ".gitmodules",
"chars": 517,
"preview": "[submodule \"test/test-cases/secrules-language-tests\"]\n\tpath = test/test-cases/secrules-language-tests\n\turl = https://git"
},
{
"path": "AUTHORS",
"chars": 202,
"preview": "zimmerle = Felipe Zimmerle <felipe@zimmerle.org>\nrbarnett = Ryan C. Barnett <rcbarnett@gmail.com>\ncsanders-git = Chaim S"
},
{
"path": "CHANGES",
"chars": 30942,
"preview": "v3.0.14 - 2025-Feb-25\n---------------------\n\n - [fix: fixed htmlEntityDecode methods]\n [PR from private repo - @thes"
},
{
"path": "LICENSE",
"chars": 11357,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "Makefile.am",
"chars": 2401,
"preview": "\nif TEST_UTILITIES\nexport MAYBE_TEST = test\nendif\n\nif EXAMPLES\nexport MAYBE_EXAMPLES = examples\nendif\n\n\nSUBDIRS = \\\n\toth"
},
{
"path": "README.md",
"chars": 16032,
"preview": "\n<picture>\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"./others/modsec_white_bg.png\">\n <source media=\"(prefe"
},
{
"path": "SECURITY.md",
"chars": 260,
"preview": "# Security Policy\n\n## Supported Versions\n\nThe latest versions of both v2.9.x and v3.0.x are supported.\n\n## Reporting a V"
},
{
"path": "build/.empty",
"chars": 0,
"preview": ""
},
{
"path": "build/ax_cxx_compile_stdcxx.m4",
"chars": 21562,
"preview": "# ===========================================================================\n# https://www.gnu.org/software/autoconf-a"
},
{
"path": "build/ax_prog_doxygen.m4",
"chars": 17906,
"preview": "# ===========================================================================\n# http://www.gnu.org/software/autocon"
},
{
"path": "build/ax_valgrind_check.m4",
"chars": 8919,
"preview": "# ===========================================================================\n# http://www.gnu.org/software/autoconf"
},
{
"path": "build/curl.m4",
"chars": 1230,
"preview": "dnl Check for CURL Libraries\ndnl Sets:\ndnl CURL_CFLAGS\ndnl CURL_LDADD\ndnl CURL_LDFLAGS\ndnl CURL_VERSION\ndnl CURL_DI"
},
{
"path": "build/libgeoip.m4",
"chars": 287,
"preview": "dnl Check for GeoIP Libraries\ndnl Sets:\ndnl GEOIP_CFLAGS\ndnl GEOIP_LDADD\ndnl GEOIP_LDFLAGS\ndnl GEOIP_VERSION\ndnl GE"
},
{
"path": "build/libmaxmind.m4",
"chars": 307,
"preview": "dnl Check for MaxMind Libraries\ndnl Sets:\ndnl MAXMIND_CFLAGS\ndnl MAXMIND_LDADD\ndnl MAXMIND_LDFLAGS\ndnl MAXMIND_VERSI"
},
{
"path": "build/libxml.m4",
"chars": 326,
"preview": "dnl Check for LIBXML2 Libraries\ndnl Sets:\ndnl LIBXML2_CFLAGS\ndnl LIBXML2_LDADD\ndnl LIBXML2_LDFLAGS\ndnl LIBXML2_VERSI"
},
{
"path": "build/lmdb.m4",
"chars": 844,
"preview": "dnl Check for LMDB Libraries\ndnl LMDB is disabled by default; only enabled when --with-lmdb is given.\ndnl Sets:\ndnl LMD"
},
{
"path": "build/lua.m4",
"chars": 3205,
"preview": "dnl Check for LUA Libraries\ndnl Sets:\ndnl LUA_CFLAGS\ndnl LUA_LDADD\ndnl LUA_LDFLAGS\ndnl LUA_DISPLAY\ndnl LUA_FOUND\n\nA"
},
{
"path": "build/msc_find_lib.m4",
"chars": 8854,
"preview": "dnl MSC_CHECK_LIB: Generic library detection macro\ndnl\ndnl MSC_CHECK_LIB(NAME, PKG_NAMES, HEADER, LIB_NAMES, EXTRA_CFLAG"
},
{
"path": "build/pcre.m4",
"chars": 1231,
"preview": "dnl Check for PCRE Libraries\ndnl Sets:\ndnl PCRE_CFLAGS\ndnl PCRE_LDADD\ndnl PCRE_LDFLAGS\ndnl PCRE_VERSION\ndnl PCRE_FO"
},
{
"path": "build/pcre2.m4",
"chars": 351,
"preview": "dnl Check for PCRE2 Libraries\ndnl PCRE2 is enabled by default (mandatory unless --with-pcre is used).\ndnl Sets:\ndnl PCR"
},
{
"path": "build/release.sh",
"chars": 400,
"preview": "#!/bin/bash\n\ngit clean -xfdi\ngit submodule foreach --recursive git clean -xfdi\n\nVERSION=`git describe --tags`\nDIR_NAME=\""
},
{
"path": "build/ssdeep.m4",
"chars": 263,
"preview": "dnl Check for SSDEEP Libraries\ndnl Sets:\ndnl SSDEEP_CFLAGS\ndnl SSDEEP_LDADD\ndnl SSDEEP_LDFLAGS\ndnl SSDEEP_DISPLAY\ndn"
},
{
"path": "build/win32/CMakeLists.txt",
"chars": 9256,
"preview": "cmake_minimum_required(VERSION 3.24)\n\nset(BASE_DIR ${CMAKE_CURRENT_LIST_DIR}/../..)\n\noption(WITH_LMDB \"Include LMDB s"
},
{
"path": "build/win32/ConfigureChecks.cmake",
"chars": 740,
"preview": "include(CheckIncludeFile)\ninclude(CheckIncludeFiles)\n\ncheck_include_file(\"dlfcn.h\" HAVE_DLFCN_H)\ncheck_include_file(\"int"
},
{
"path": "build/win32/README.md",
"chars": 5602,
"preview": "# libModSecurity Windows build information <!-- omit from toc -->\n\nThe Windows build of libModSecurity uses Build Tools "
},
{
"path": "build/win32/conanfile.txt",
"chars": 167,
"preview": "[requires]\nyajl/2.1.0\npcre2/10.42\nlibxml2/2.12.6\nlua/5.4.6\nlibcurl/8.6.0\nlmdb/0.9.31\nlibmaxminddb/1.9.1\ndirent/1.24\npoco"
},
{
"path": "build/win32/config.h.cmake",
"chars": 2483,
"preview": "/* config.h.cmake. Based upon generated config.h.in. */\n\n#ifndef MODSECURITY_CONFIG_H\n#define MODSECURITY_CONFIG_H 1\n\n"
},
{
"path": "build/win32/docker/Dockerfile",
"chars": 4112,
"preview": "# escape=`\n\nARG FROM_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2022\nFROM ${FROM_IMAGE}\n\n# reset the shell.\nSHELL [\""
},
{
"path": "build/win32/docker/InstallBuildTools.cmd",
"chars": 430,
"preview": "@rem Copyright (C) Microsoft Corporation. All rights reserved.\n@rem Licensed under the MIT license. See LICENSE.txt in t"
},
{
"path": "build/win32/docker/git.inf",
"chars": 430,
"preview": "[Setup]\nLang=default\nDir=C:\\Program Files\\Git\nGroup=Git\nNoIcons=0\nSetupType=default\nComponents=ext,ext\\shellhere,ext\\gui"
},
{
"path": "build/yajl.m4",
"chars": 1030,
"preview": "dnl Check for YAJL Libraries\ndnl Sets:\ndnl YAJL_CFLAGS\ndnl YAJL_LDADD\ndnl YAJL_LDFLAGS\ndnl YAJL_VERSION\ndnl YAJL_DI"
},
{
"path": "build.sh",
"chars": 717,
"preview": "#!/bin/sh\n\nrm -rf autom4te.cache\nrm -f aclocal.m4\n\ncd src\nrm -f headers.mk\necho \"noinst_HEADERS = \\\\\" > headers.mk\nls -1"
},
{
"path": "configure.ac",
"chars": 15593,
"preview": "# ModSecurity configure.ac\n\nAC_PREREQ([2.69])\n\n# Get the hash of the last commit, to be used if it is not an\n# official "
},
{
"path": "doc/.empty",
"chars": 0,
"preview": ""
},
{
"path": "doc/Makefile.am",
"chars": 254,
"preview": "\nACLOCAL_AMFLAGS = -I build\n\n# Doxygen support\n# include $(top_srcdir)/build/ax_prog_doxygen.m4\n\n# distribution of the D"
},
{
"path": "doc/doxygen.cfg",
"chars": 104958,
"preview": "# Doxyfile 1.8.8\n\n# This file describes the settings to be used by the documentation system\n# doxygen (www.doxygen.org) "
},
{
"path": "examples/Makefile.am",
"chars": 365,
"preview": "\nACLOCAL_AMFLAGS = -I build\n\n\nSUBDIRS = \\\n\tmultiprocess_c \\\n\tmultithread \\\n\treading_logs_with_offset \\\n\treading_logs_via"
},
{
"path": "examples/multiprocess_c/Makefile.am",
"chars": 455,
"preview": "\n\nnoinst_PROGRAMS = multi\n\nmulti_SOURCES = \\\n\tmulti.c\n\nmulti_LDADD = \\\n\t$(SSDEEP_LDADD) \\\n\t$(LUA_LDADD) \\\n\t$(MAXMIND_LDA"
},
{
"path": "examples/multiprocess_c/basic_rules.conf",
"chars": 435,
"preview": "SecDebugLog /dev/stdout\nSecDebugLogLevel 9\n\n\nSecRule REQUEST_HEADERS:User-Agent \".*\" \"id:1,phase:1,t:sha1,t:hexEncode,se"
},
{
"path": "examples/multiprocess_c/multi.c",
"chars": 4085,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "examples/multithread/Makefile.am",
"chars": 879,
"preview": "\n\nnoinst_PROGRAMS = multithread\n\nmultithread_SOURCES = \\\n\tmultithread.cc\n\nmultithread_LDADD = \\\n\t$(CURL_LDADD) \\\n\t$(GEOI"
},
{
"path": "examples/multithread/basic_rules.conf",
"chars": 548,
"preview": "SecDebugLog debug.log\nSecDebugLogLevel 9\n\n\nSecRule REQUEST_HEADERS:User-Agent \".*\" \"id:1,phase:1,t:sha1,t:hexEncode,setv"
},
{
"path": "examples/multithread/multithread.cc",
"chars": 2287,
"preview": "#include <iostream>\n#include <thread>\n#include <array>\n\n#include <modsecurity/modsecurity.h>\n#include <modsecurity/trans"
},
{
"path": "examples/reading_logs_via_rule_message/Makefile.am",
"chars": 897,
"preview": "\n\nnoinst_PROGRAMS = simple_request\n\nsimple_request_SOURCES = \\\n\tsimple_request.cc\n\nsimple_request_LDADD = \\\n\t$(CURL_LDAD"
},
{
"path": "examples/reading_logs_via_rule_message/blocked_request.conf",
"chars": 98,
"preview": "SecRule ARGS:param1 \"test\" \"id:1,deny,phase:2,chain,msg:'test'\"\nSecRule ARGS:param1 \"test\" \"log\"\n\n"
},
{
"path": "examples/reading_logs_via_rule_message/blocked_request_engine_on.conf",
"chars": 56,
"preview": "SecRuleEngine On\nSecRule ARGS:param1 \"test\" \"id:1,deny\"\n"
},
{
"path": "examples/reading_logs_via_rule_message/match.conf",
"chars": 78,
"preview": "SecRule ARGS:param1 \"test\" \"id:1,deny,msg:'this',msg:'is',msg:'a',msg:'test'\"\n"
},
{
"path": "examples/reading_logs_via_rule_message/no_match.conf",
"chars": 87,
"preview": "SecRule ARGS:param1 \"WHEEE\" \"id:1,phase:2,deny,msg:'this',msg:'is',msg:'a',msg:'test'\"\n"
},
{
"path": "examples/reading_logs_via_rule_message/reading_logs_via_rule_message.h",
"chars": 6455,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "examples/reading_logs_via_rule_message/simple_request.cc",
"chars": 1138,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "examples/reading_logs_with_offset/Makefile.am",
"chars": 845,
"preview": "\n\nnoinst_PROGRAMS = read\n\nread_SOURCES = \\\n\tread.cc\n\nread_LDADD = \\\n\t$(CURL_LDADD) \\\n\t$(GEOIP_LDADD) \\\n\t$(MAXMIND_LDADD)"
},
{
"path": "examples/reading_logs_with_offset/read.cc",
"chars": 784,
"preview": "\n#include <stdio.h>\n#include <string.h>\n\n#include <modsecurity/modsecurity.h>\n\n\n// Variable offset - REQUEST_HEADERS_NAM"
},
{
"path": "examples/simple_example_using_c/Makefile.am",
"chars": 407,
"preview": "\n\nnoinst_PROGRAMS = test\n\ntest_SOURCES = \\\n\ttest.c\n\ntest_LDADD = \\\n\t$(GLOBAL_LDADD) \\\n\t$(LUA_LDADD) \\\n\t$(SSDEEP_LDADD)\n\n"
},
{
"path": "examples/simple_example_using_c/basic_rules.conf",
"chars": 8314,
"preview": "# -- Rule engine initialization ----------------------------------------------\n\n# Enable ModSecurity, attaching it to ev"
},
{
"path": "examples/simple_example_using_c/test-valgrind.sh",
"chars": 100,
"preview": "#!/usr/bin/env bash\n\nvalgrind --tool=massif\nvalgrind --show-leak-kinds=all --leak-check=full ./test\n"
},
{
"path": "examples/simple_example_using_c/test.c",
"chars": 2287,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "examples/using_bodies_in_chunks/Makefile.am",
"chars": 904,
"preview": "\n\nnoinst_PROGRAMS = simple_request\n\nsimple_request_SOURCES = \\\n\tsimple_request.cc\n\nsimple_request_LDADD = \\\n\t$(CURL_LDAD"
},
{
"path": "examples/using_bodies_in_chunks/example.conf",
"chars": 98,
"preview": "SecDebugLog /dev/stdout\nSecDebugLogLevel 9\nSecRule RESPONSE_BODY \"/soap:Body\" \"id:1,phase:5,deny\"\n"
},
{
"path": "examples/using_bodies_in_chunks/simple_request.cc",
"chars": 8267,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "headers/modsecurity/actions/action.h",
"chars": 3466,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "headers/modsecurity/anchored_set_variable.h",
"chars": 3414,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "headers/modsecurity/anchored_set_variable_translation_proxy.h",
"chars": 3566,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2023 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "headers/modsecurity/anchored_variable.h",
"chars": 1752,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "headers/modsecurity/audit_log.h",
"chars": 5921,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "headers/modsecurity/collection/collection.h",
"chars": 6366,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2023 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "headers/modsecurity/collection/collections.h",
"chars": 1917,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "headers/modsecurity/debug_log.h",
"chars": 1572,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "headers/modsecurity/intervention.h",
"chars": 1656,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "headers/modsecurity/modsecurity.h",
"chars": 8547,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2023 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "headers/modsecurity/rule.h",
"chars": 2668,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "headers/modsecurity/rule_marker.h",
"chars": 1853,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "headers/modsecurity/rule_message.h",
"chars": 2832,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "headers/modsecurity/rule_unconditional.h",
"chars": 1241,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "headers/modsecurity/rule_with_actions.h",
"chars": 4175,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "headers/modsecurity/rule_with_operator.h",
"chars": 2239,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "headers/modsecurity/rules.h",
"chars": 2838,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "headers/modsecurity/rules_exceptions.h",
"chars": 2946,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "headers/modsecurity/rules_properties.h",
"chars": 573,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "headers/modsecurity/rules_set.h",
"chars": 2817,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "headers/modsecurity/rules_set_phases.h",
"chars": 1378,
"preview": "\n/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustw"
},
{
"path": "headers/modsecurity/rules_set_properties.h",
"chars": 19435,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "headers/modsecurity/transaction.h",
"chars": 24443,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "headers/modsecurity/variable_origin.h",
"chars": 1359,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "headers/modsecurity/variable_value.h",
"chars": 2921,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2023 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "modsecurity.conf-recommended",
"chars": 11338,
"preview": "# -- Rule engine initialization ----------------------------------------------\n\n# Enable ModSecurity, attaching it to ev"
},
{
"path": "modsecurity.pc.in",
"chars": 391,
"preview": "prefix=@prefix@\nexec_prefix=@exec_prefix@\nlibdir=@libdir@\nincludedir=@includedir@\n\nName: ModSecurity\nDescription: ModSec"
},
{
"path": "others/Makefile.am",
"chars": 1048,
"preview": "\nnoinst_LTLIBRARIES = libinjection.la libmbedtls.la\n\nlibinjection_la_SOURCES = \\\n\tlibinjection/src/libinjection_html5.c "
},
{
"path": "src/Makefile.am",
"chars": 8658,
"preview": "\nif BUILD_PARSER\nexport MAYBE_PARSER = parser\nendif\n\n\nSUBDIRS = \\\n\t$(MAYBE_PARSER)\n\n\nlib_LTLIBRARIES = libmodsecurity.la"
},
{
"path": "src/actions/accuracy.cc",
"chars": 1089,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/accuracy.h",
"chars": 1150,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/action.cc",
"chars": 1462,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/audit_log.cc",
"chars": 1086,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/audit_log.h",
"chars": 1101,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/block.cc",
"chars": 1287,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/block.h",
"chars": 1145,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/capture.cc",
"chars": 1047,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/capture.h",
"chars": 1008,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/chain.cc",
"chars": 794,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/chain.h",
"chars": 1087,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/ctl/audit_engine.cc",
"chars": 1829,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2022 Trustwave Holdings, Inc. (http://www.trustwave.com/"
},
{
"path": "src/actions/ctl/audit_engine.h",
"chars": 1326,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2022 Trustwave Holdings, Inc. (http://www.trustwave.com/"
},
{
"path": "src/actions/ctl/audit_log_parts.cc",
"chars": 1283,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/ctl/audit_log_parts.h",
"chars": 1252,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/ctl/parse_xml_into_args.cc",
"chars": 1914,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2025 OWASP ModSecurity project\n *\n * You may not use thi"
},
{
"path": "src/actions/ctl/parse_xml_into_args.h",
"chars": 1329,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2025 OWASP ModSecurity Project\n *\n * You may not use thi"
},
{
"path": "src/actions/ctl/request_body_access.cc",
"chars": 1586,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/ctl/request_body_access.h",
"chars": 1240,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/ctl/request_body_processor_json.cc",
"chars": 1079,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/ctl/request_body_processor_json.h",
"chars": 1162,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/ctl/request_body_processor_urlencoded.cc",
"chars": 1094,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/ctl/request_body_processor_urlencoded.h",
"chars": 1192,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/ctl/request_body_processor_xml.cc",
"chars": 1075,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/ctl/request_body_processor_xml.h",
"chars": 1157,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/ctl/rule_engine.cc",
"chars": 1834,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/ctl/rule_engine.h",
"chars": 1295,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/ctl/rule_remove_by_id.cc",
"chars": 2818,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2023 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/ctl/rule_remove_by_id.h",
"chars": 1230,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/ctl/rule_remove_by_tag.cc",
"chars": 1103,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/ctl/rule_remove_by_tag.h",
"chars": 1205,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/ctl/rule_remove_target_by_id.cc",
"chars": 1609,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/ctl/rule_remove_target_by_id.h",
"chars": 1270,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/ctl/rule_remove_target_by_tag.cc",
"chars": 1452,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/ctl/rule_remove_target_by_tag.h",
"chars": 1245,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/data/status.cc",
"chars": 1193,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/data/status.h",
"chars": 1253,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/disruptive/allow.cc",
"chars": 1704,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/disruptive/allow.h",
"chars": 1879,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/disruptive/deny.cc",
"chars": 1364,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/disruptive/deny.h",
"chars": 1246,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/disruptive/drop.cc",
"chars": 1543,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/disruptive/drop.h",
"chars": 1211,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/disruptive/pass.cc",
"chars": 1179,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/disruptive/pass.h",
"chars": 1174,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/disruptive/redirect.cc",
"chars": 1720,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/disruptive/redirect.h",
"chars": 1637,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/exec.cc",
"chars": 1451,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/exec.h",
"chars": 1139,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/expire_var.cc",
"chars": 3715,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2023 Trustwave Holdings, Inc. (http://www.trustwave.com/"
},
{
"path": "src/actions/expire_var.h",
"chars": 1298,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2023 Trustwave Holdings, Inc. (http://www.trustwave.com/"
},
{
"path": "src/actions/init_col.cc",
"chars": 2200,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/init_col.h",
"chars": 1358,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/log.cc",
"chars": 1077,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/log.h",
"chars": 1046,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/log_data.cc",
"chars": 1151,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/log_data.h",
"chars": 1340,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/maturity.cc",
"chars": 1089,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/maturity.h",
"chars": 1150,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/msg.cc",
"chars": 1782,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/msg.h",
"chars": 1346,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/multi_match.cc",
"chars": 866,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/multi_match.h",
"chars": 1090,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/no_audit_log.cc",
"chars": 1008,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/no_audit_log.h",
"chars": 1113,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/no_log.cc",
"chars": 1024,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/no_log.h",
"chars": 1059,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/phase.cc",
"chars": 2332,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/phase.h",
"chars": 1213,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/rev.cc",
"chars": 876,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/rev.h",
"chars": 1096,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/rule_id.cc",
"chars": 1369,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/rule_id.h",
"chars": 1192,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/set_env.cc",
"chars": 1252,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/set_env.h",
"chars": 1269,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/set_rsc.cc",
"chars": 1132,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/set_rsc.h",
"chars": 1269,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/set_sid.cc",
"chars": 1134,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/set_sid.h",
"chars": 1269,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/set_uid.cc",
"chars": 1133,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/set_uid.h",
"chars": 1269,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/set_var.cc",
"chars": 4967,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/set_var.h",
"chars": 2015,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/severity.cc",
"chars": 2399,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/severity.h",
"chars": 1167,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/skip.cc",
"chars": 1322,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/skip.h",
"chars": 1097,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/skip_after.cc",
"chars": 1021,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/skip_after.h",
"chars": 1178,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/tag.cc",
"chars": 2362,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/tag.h",
"chars": 1245,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/transformations/base64_decode.cc",
"chars": 874,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/transformations/base64_decode.h",
"chars": 1005,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/transformations/base64_decode_ext.cc",
"chars": 890,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/transformations/base64_decode_ext.h",
"chars": 1020,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/transformations/base64_encode.cc",
"chars": 874,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/transformations/base64_encode.h",
"chars": 1005,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/transformations/cmd_line.cc",
"chars": 1931,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/transformations/cmd_line.h",
"chars": 986,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/transformations/compress_whitespace.cc",
"chars": 1268,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/transformations/compress_whitespace.h",
"chars": 1029,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/transformations/css_decode.cc",
"chars": 6094,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/transformations/css_decode.h",
"chars": 993,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/transformations/escape_seq_decode.cc",
"chars": 3971,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
},
{
"path": "src/actions/transformations/escape_seq_decode.h",
"chars": 1020,
"preview": "/*\n * ModSecurity, http://www.modsecurity.org/\n * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwa"
}
]
// ... and 619 more files (download for full content)
About this extraction
This page contains the full source code of the owasp-modsecurity/ModSecurity GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 819 files (4.0 MB), approximately 1.1M tokens, and a symbol index with 1738 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.