Purge module TagInvalidation allows spaces

Created on 3 July 2025, 10 days ago

Problem/Motivation

See 🐛 white spaces in cache tag Active where someone has enqueued a cache tag for invalidation that contains a space, and then the purger plugin is deciding that that is an error.

Drupal cache tags should not contain spaces , so purge module should validate them as such.

There's already a method \Drupal\purge\Plugin\Purge\Invalidation\TagInvalidation::validateExpression that does validation, it could also validate for spaces.

Steps to reproduce

Purge some cache tags with a space.

Proposed resolution

Validate that the cache tag doesn't contain a space in \Drupal\purge\Plugin\Purge\Invalidation\TagInvalidation::validateExpression

Remaining tasks

Decide if this is a sensible idea etc.

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇬🇧United Kingdom steven jones

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

Comments & Activities

Production build 0.71.5 2024