Skip to content

Support PCRE2 #2719

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 21, 2022
Merged

Support PCRE2 #2719

merged 1 commit into from
Apr 21, 2022

Conversation

martinhsv
Copy link
Contributor

@martinhsv martinhsv commented Apr 20, 2022

This pull request provides initial support for PCRE2 on an experimental basis. (Closes #2668 )

To use PCRE2 with nginx and ModSecurity you need to:

  • use a version of nginx that supports it (e.g. nginx v1.21.5 or 1.21.6)
  • use a version of the connector (ModSecurity-nginx) at or later than owasp-modsecurity/ModSecurity-nginx@1c32794
  • include the --with-pcre2 option when running ModSecurity's ./configure

@martinhsv martinhsv merged commit ced56c5 into v3/master Apr 21, 2022
@dvershinin
Copy link
Contributor

@istiak101 @martinhsv apparently there's a bug somewhere.

--with-pcre2 only compiles fine if both pcre1 and pcre2 devel libs installed. And the resulting binary links with both, which is incorrect, of course.

If only pcre2 devel is installed on the system, the error message during configure is always configure: error: pcre library is required.

See filed new bug #2750

@martinhsv
Copy link
Contributor Author

martinhsv commented May 31, 2022

Hello @istiak101 ,

As @dvershinin has noted, the dependency on pcre1 has not been removed even if you specifically want to use pcre2. But beyond that, does it work if you just use (although =yes should work too):

./configure --with-pcre2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for PCRE2
2 participants