Merge "SECURITY: Improve regular expression performance" into REL1_39

This commit is contained in:
jenkins-bot 2024-06-04 15:02:28 +00:00 committed by Gerrit Code Review
commit dd8489deee

View file

@ -173,7 +173,7 @@ class MediaWikiGadgetsDefinitionRepo extends GadgetRepo {
foreach ( $lines as $line ) {
$m = [];
if ( preg_match( '/^==+ *([^*:\s|]+?)\s*==+\s*$/', $line, $m ) ) {
if ( preg_match( '/^==+ *([^*:\s|]+)\s*(?<!=)==+\s*$/', $line, $m ) ) {
$section = $m[1];
} else {
$gadget = $this->newFromDefinition( $line, $section );