john-lang-86 / lj-maintenance-mode

Simple maintenance mode wordpress plugin.
https://plugins.itsluk.as/maintenance-mode/
0 stars 1 forks source link

Allowed URIs (Contains) - Trailing Slashes #1

Closed john-lang-86 closed 2 years ago

john-lang-86 commented 2 years ago

The 'Allowed URIs (Contains)' capability is too sensitive to trailing slashes, resulting in false positive maintenance mode pages being displayed ... based upon the values in the user entered lists (the $haystack).

Situation: The $request_uri and $needle are not a true like-for-like comparison. The $request_uri is ignoring the trailing slash but the $needle isn't. Solution: Add the ignore trailing slash capability to the $needle for the 'Allowed URIs (Contains)' capability.