Issue
- After enabling ModSecurity, below error message is printing in the webserver log file, and due to this user is unable to log in:
ModSecurity: Access denied with code 403 (phase 2). Matched "Operator `StrEq' with parameter `0' against variable `TX:MSC_PCRE_LIMITS_EXCEEDED' (Value: `1' ) [file "/etc/nginx/modsec/modsecurity.conf"] [line "146"] [id "200005"] [rev ""] [msg "ModSecurity internal error flagged: TX:MSC_PCRE_LIMITS_EXCEEDED"] [data ""] [severity "0"] [ver ""] [maturity "0"] [accuracy "0"] [hostname "10.XX.X.XX"] [uri "/combo"] [unique_id "17235674723.553371"] [ref ""], client: 136.XXX.XXX.XX, server: , request: "GET /combo?browserId=chrome&minifierType=js&languageId=en_US&t=1721637565963&/o/frontend-js-aui-web/aui/aui/aui-min.js&/o/frontend-js-aui-web/liferay/modules.js&/o/frontend-js-aui-web/liferay/aui_sandbox.js&/o/frontend-js-aui-web/aui/attribute-base/attribute-base-min.js&/o/frontend-js-aui-web/aui/attribute-complex/attribute-complex-min.js
Environment
- LXC-SM
- 2024.Q2
Resolution
- This error comes when MSC_PCRE_LIMITS_EXCEEDED. Hence, to resolve this, users need to increase PCRE Limits for SecPcreMatchLimit and SecPcreMatchLimitRecursion in modesecurity.conf file.
NOTE: Liferay Support does not recommend or endorse specific third-party products over others. The information provided about products not created by Liferay is for reference purposes only, and any implementation of these principles will be at your team's discretion.