Logs get filled with error messages like:

Warning: preg_match(): Compilation failed: ... in _lazyloader_excluded_by_filename() (line 251 of .../lazyloader/lazyloader.module).

In code we see the line:

return (bool) preg_match('/^' . $filename . '$/m', $excluded_files);

It's easy to see that here is used unquoted variable $filename - regex injection.

Here is remedy:

return (bool) preg_match('/^' . preg_quote ($filename) . '$/m', $excluded_files);
CommentFileSizeAuthor
#2 regex_quote-2886402-1.patch498 bytesragnarkurm

Comments

ragnarkurm created an issue. See original summary.

ragnarkurm’s picture

StatusFileSize
new498 bytes
legolasbo’s picture

Status: Active » Fixed

#2904825: Issue when multiple filename excluded and only some style allowed probably fixed this. Please reopen if that's not the case.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.