Tags in blacklist are not matched as prefixes

Created on 26 March 2024, 8 months ago

The configuration form (and everywhere in the code) states that the string you enter in the blacklist are used as prefixes to match against tags:

The strings are matched as prefixes, so for example config: will match tags as config:core.extension and config:block_list.

But this is the code behind the matching:

if (strpos($tag, $prefix) !== FALSE) {
  $blacklisted = TRUE;
}

This code checks if the tag contains the blacklist value, instead of starts with it.
This should be changed to:

if (strpos($tag, $prefix) === 0) {
  $blacklisted = TRUE;
}
🐛 Bug report
Status

Needs review

Version

3.0

Component

Code

Created by

🇧🇪Belgium rp7

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024