Problem/Motivation
Following discussion with the Drupal Security Team, it was agreed that this could be handled in a public "security improvements" issue.
At present Drupal's file API allows filenames to be created which could be dangerous if they're not handled safely. This is not a directly exploitable vulnerability, but improvements could be made that would reduce the likelihood of filenames being used as part of a chained attack.
Command injection is a specific concern here.
https://owasp.org/www-community/attacks/Command_Injection
https://portswigger.net/web-security/os-command-injection
Edit: XSS is also possible if filenames are rendered without appropriate sanitisation. The fix for this is similar i.e. restrict characters that can be used in filenames, although the specifically "dangerous" set of characters may be slightly different e.g. quotes and angle brackets.
Steps to reproduce
In some cases, browsers will escape/encode certain characters in a normal file upload, but it may be possible to avoid that escaping using a tool like Burp Suite, or perhaps via web services (rest / jsonapi).
An example of a dangerous filename which I believe a normal file field will currently accept is:
foo";echo `whoami`; #.txt
A fairly recent improvement to filename handling (which we could build upon) is described in this Change Record:
https://www.drupal.org/node/2972665
Proposed resolution
- Always remove/replace specific characters that may be used for command injection e.g.
" ; # |`and if possible' &.
Remaining tasks
- Implement improvements.
- Add tests (e.g. in \Drupal\Tests\file\Functional\SaveUploadTest ).
- Ensure that improvements also apply to web services and other uses of the API if possible.
User interface changes
Default filename handling will change - notably:
- Some "special characters" - mostly punctuation - will be removed from filenames on upload.
Introduced terminology
n/a?
API changes
Changes to filename handling may represent an API change.
Data model changes
n/a?
Release notes snippet
Drupal core now replaces a set of dangerous characters (for example shell metacharacters) in filenames with underscores for security reasons.
| Comment | File | Size | Author |
|---|---|---|---|
| #40 | Screenshot_20251209_103624.png | 347.33 KB | mcdruid |
Issue fork drupal-3516706
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mcdruid commentedComment #3
mcdruid commentedComment #4
kim.pepperAll of these are available as optional settings. Are you saying we should default to safer settings, or enforce them?
Comment #5
mcdruid commentedI'd recommend that we enforce the removal (/ substitution) of the most dangerous characters.
For removal of spaces, that'd be ok as a default (would people really want to turn it off?!)
Comment #6
mcdruid commented@kim.pepper although the existing options would remove all of the characters I highlighted as a concern, they do more than that.
I wouldn't advocate stripping filenames down to only ASCII / alpha-numeric characters (by default or as a mandatory setting) because of how restrictive that is for different languages.
I'm proposing a fairly limited number of forbidden characters - those which have significance for the shell - which would be a subset of what would be stripped by any of the existing options IIUC?
Comment #7
mcdruid commentedHaving said that, I went to look for a definitive list of "dangerous characters" and ended up with quite a lot of "it depends".
This is not definitive, but e.g. https://stackoverflow.com/questions/15783701/which-characters-need-to-be...
There are some quite good lists using e.g. the shell escaping option that printf (and apparently ls) offer - e.g.
I feel like most of those make sense; and there are a fair number of characters that would be allowed.
Whether this would be more or less confusing / user friendly than just stripping all punctuation though is perhaps a usability question.
Looks like the code mostly uses regex; I wonder whether the
punctcharacter class would be any use. It'd remove the "safe" characters from the list above which we may not want to do.To be clear what I'm looking for here is something that would remove all the dangerous shell characters but not limit users to strict ASCII alphanum without e.g. accented letters etc..
Comment #8
mcdruid commentedFWIW by default Wordpress removes a load of "special" characters from filenames:
https://github.com/WordPress/wordpress-develop/blob/6.7.2/src/wp-include...
Joomla seems to have decided to let the underlying OS decide what it will and will not allow in filenames :shrug:
https://github.com/joomla/joomla-cms/issues/33214
Comment #10
kim.pepperHere's a basic implementation. I haven't looked at any tests yet.
Comment #11
mcdruid commentedThanks, that's a good start. Looks like you've borrowed the list of chars to strip from wordpress. Perhaps we could remove a few of the "safe" ones based on the list in #7; we're only talking about a few e.g.
% + = :.FWIW here's how typo3 does this:
https://github.com/TYPO3-CMS/core/blob/v13.4.9/Classes/Resource/Driver/L...
The comments suggest that it's pretty strict:
...but in actual fact it's a bit more nuanced as there are some settings around allowing / remapping utf8 characters.
I'll try to do some work on this but am short on time just now.
Comment #12
mcdruid commentedsorry, didn't mean to change status
Comment #13
kim.pepperRemoved config option, and updated tests now we replace special chars.
Comment #14
smustgrave commentedTests appear to be there so removing that tag.
Looking at the solution were all options taken?
Comment #15
kim.pepperDo you mean are all the special characters included?
Comment #16
smustgrave commentedMean the proposed solution read like there were several approaches? Unless I read that wrong
Comment #17
kim.pepperI think we agreed on stripping special characters. It was more about which characters to strip. I have a feeling stripping whitespace might be contentious.
Comment #18
smustgrave commentedCan what’s not making it in be scratched from the proposed solutio
Comment #19
smustgrave commentedSorry to be a stickler
Comment #20
cmlaraAs a site owner, I'm going to miss Parentheses, Ampersand and Space., A little less Brackets, Pound Sign and Exclamation Point though I encounter them.
As a security engineer: This is not a bad hardening, however it is certainly not a fix for wherever the faults actually occur.
As someone who has used this in the past to perform sample RCE's against site setups; I can say yes this would make it much harder to exploit.
I also wish to reiterate that for these characters to cause issue someone has had to make some very serious mistakes down stream, mistakes that this change likely does not actually remove the vulnerabilities , just at most makes it significantly harder to exploit (move from Basic to Complex, saving 1 point on the Drupal Vulnerability Scoring ) and maybe move the Impacted Environment from All to Uncommon (2 points on the Drupal Score scale).
I agree with @smustgrave the 'excluded' ideas would be nice to have listed for historical purposes.
Comment #21
smustgrave commentedFor the summary cleanup please
Comment #22
kim.pepperTBH I don't have a strong opinion on which characters should be included or excluded. I'll happily defer to those with a stronger security background. I _do_ think removing whitespace will be disruptive to site owners.
Comment #23
mcdruid commentedThanks - I'm going to tag this for a usability review (per https://www.drupal.org/docs/develop/issues/issue-procedures-and-etiquett...) as I agree that it's likely stripping spaces from filenames on uploads may not be universally welcomed.
It would, however, have benefits in terms of Security Hardening (it's very hard to achieve Command Injection without any spaces). (Acknowledging the comment in #20 that if a command injection vulnerability of similar exists, this is not the only fix that's needed.)
There are also other benefits like making it easier to iterate over batches of files in the shell etc.. but that's probably out of scope here.
I personally loathe spaces in filenames but I am probably not representative of a broad cross section of users.
So far I think there's some consensus that stripping "special characters" from filenames likely provides enough benefit (in terms of security) to outweigh annoyance some users may feel at having e.g. punctuation marks removed from their filenames, but stripping spaces may be seen as a step too far.
It could be a default that site owners could disable in the file handling options. I'd argue to make the special character stripping mandatory, but that's also open to debate.
Previous comments include some light research on how other CMSs/Frameworks do this. Wordpress and Typo3 both strip (or substitute) most punctuation by default, and it looks like they both swap out spaces for either an underscore or dash AFAICS.
Drupal already has an option to replace whitespace in filenames with _ or - but it's not enabled by default. I'd like to turn that on by default as part of this issue.
What does the UX-Team think about having mandatory stripping of special chars from filenames, plus enabling swapping spaces out for - or _ by default?
(I've not yet updated the IS to eliminate any proposed options as I don't think we have eliminated any yet.. agree we should do that when we get to that point though.)
Comment #24
mcdruid commentedI've posted some more details about my motivation for pursuing this change in a blog post about a recent Security Advisory:
https://www.mcdruid.co.uk/article/hacking-ai-module-drupal-cms
Hopefully the extra context this provides outweighs any whiff of self-promotion :)
To summarise the proposal briefly, the change would be:
-). In practice this means most but not all punctuation (e.g. see list in #8).-. This is existing optional functionality which would be enabled by default.This would be pretty similar to how filenames are sanitised by both WordPress and Typo3.
Comment #25
kim.pepperRebased on 11.x
I also switch the file install config to
replace_whitespace: true. I'm not sure this is sufficient as a default or whether we want to go the extra step and enable it via an update hook. This will be disruptive as per #2Comment #26
mcdruid commentedThank you to the Usability Team who reviewed and discussed this issue in their meeting #3526141: Drupal Usability Meeting 2025-05-30. I believe it's still on the todo list to comment here, but the meeting recording and transcript are linked to from that issue so we can glean details of their review in the meantime.
To attempt to summarise - the question was:
...and the answer:
I'll ask @benjifisher to correct me if that's not quite accurate.
Another important issue that was brought up was whether we're proposing to retrospectively tackle existing files.
I think that's a "no"; the likelihood of unintended consequences is really high if we tried to rename existing files, and we should limit the scope to future uploads only. (This is what Benji and the team correctly assumed).
So let's proceed on the basis that we want to:
Benji mentioned in the UX meeting that any overrides may have to happen only in settings.php as otherwise an attacker can potentially make those changes themselves (e.g. via XSS in the UI).
That's definitely a good point, but I think in the case of allowing spaces in filenames I'd be comfortable allowing that change to made in the UI if the dangerous characters are always removed with no way of overriding that behaviour.
Comment #27
mcdruid commentedUpdates to IS now that we've agreed a proposed solution.
Comment #28
kim.pepperRebased on 11.x and fixed tests. We had space ' ' in the list of special chars, but this is handled separately.
Comment #29
kim.pepperLooks like the test fail is an unrelated PHP 8.5 test.The failure is in core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldUpgradeTest.php
Comment #30
kim.pepperLooks like it's a random fail #3150040: [random test failure] ScaffoldUpgradeTest and ScaffoldTest rely on packagist.org
Comment #31
benjifisher@mcdruid:
I am sorry for the delay in adding a comment. As you said in Comment #26, the Usability team looked at this issue on 2025-05-30. I just reviewed the discussion, and your summary in #26 looks correct.
For the record, the attendees at the usability meeting were benjifisher, rkoller, and simohell.
Thanks for clarifying that the change will not affect new uploads. In fact, the change to the whitespace default will only affect newly installed sites (or sites that newly install the
filemodule).At the meeting, we had the impression that stripping punctuation was non-negotiable, so the only change we fully considered was the default handling of whitespace.
If you want more feedback from the usability team, a good way to reach out is in the #ux channel in Slack.
Comment #32
smustgrave commentedFrom reading #26 it sounds like the idea was allow for overriding the replacement list.
Comment #33
kim.pepperAdded the special chars to config with a default fallback.
Comment #34
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #35
benjifisher@kimpepper:
I see that you updated the MR. Should the issue status now be NR instead of NW?
Comment #36
kim.pepperTests are still failing so I left at NW
Comment #38
kim.pepperThis hasn't moved in a while so I'm creating a MR to just default to removing whitespace to see what breaks.
Comment #39
kim.pepperI've been debugging but still can't figure out why change the whitespace setting causes the core/modules/file/tests/src/Functional/SaveUploadTest.php error message to go from:
"The file <em class="placeholder">x�xx.gif</em> could not be uploaded because the name is invalid."to
The specified file <em class="placeholder">x�xx.gif</em> could not be uploaded.<ul><li>Only files with the following extensions are allowed: <em class="placeholder">jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp</em>...even though that extension is allowed. 🤔
Comment #40
mcdruid commentedThanks for picking this back up.
I'm not yet sure exactly why this is happening, but looks like the problem's in
\Drupal\file\EventSubscriber\FileEventSubscriber::sanitizeFilename...specifically:
When the filename containing the invalid unicode goes through that regex, it seems to end up set to
null.We can reproduce this in isolation in a PHP (8.3.6) shell:
So the sanitization ends up effectively destroying the filename (the part before extension) completely and we're left with a filename of just
gifwithout the leading dot (this is back in\Drupal\file\Upload\FileUploadHandler::handleFileUploadafter theFileUploadSanitizeNameEventhas been dispatched):That filename then fails the allowed extension validation because... well, everything's gone pear shaped.
Not sure why the whitespace stripping regex is doing this, but that seems to be why we're seeing the weird test failure.
Comment #41
mcdruid commentedAFAICS we're hitting:
https://www.php.net/manual/en/pcre.constants.php#constant.preg-bad-utf8-...
So I'm not sure if that's a problem with the test data or what.. but if it's possible to feed that input to the sanitisation as a filename, we probably ought to handle the error more gracefully.
It doesn't look like
preg_replace()throws anything catchable here, so we might have to check for the null value and decide if we want to checkpreg_last_error()to provide detailed feedback / logging about what's gone wrong, or simply bail out without trying to do further validation etc..Comment #42
kim.pepperI tried checking for a NULL return value from
preg_replace()and logging the error message.Comment #43
kim.pepperI feel we should have a separate check for invalid UTF-8 characters outside the whitespace replacement.
Comment #44
kim.pepperPer #43 I added an explicit check in
FileUploadHandlerand changed from logging an error to throwing an exception inFileEventSubscriber::sanitizeFilename()Comment #45
kim.pepperI think a check at the top of
FileEventSubscriberis the simplest approach.Comment #46
kim.pepperI wonder if we should split off a new issue and consider it a bug for not handling invalid UTF-8?
Comment #47
mcdruid commentedYeah I think a separate issue to work on the unicode handling problem would make sense.
Comment #48
kim.pepperOK will take a look tomorrow.
Comment #49
kim.pepperCreated #3562543: FileEventSubscriber::sanitizeFilename() does not check for invalid UTF-8 chars
Comment #50
kim.pepperI think we should postpone this on #3562543: FileEventSubscriber::sanitizeFilename() does not check for invalid UTF-8 chars It would be great if those following this issue could review that.
Comment #52
mcdruid commentedComment #53
alexpott#3562543: FileEventSubscriber::sanitizeFilename() does not check for invalid UTF-8 chars has landed.
Comment #54
mcdruid commentedRemoving prefix as we're no longer blocked by the invalid UTF-8 handling issue.
Comment #58
mcdruid commentedDeclaration: I used AI (specifically Claude) to help come up with the changes I've just pushed to the MR. I have manually reviewed it all, and it's the outcome of several rounds of "discussion" about the approach and implementation.
I think I suggested earlier in this issue that stripping spaces would help protect against command injection. I've since learned that's not true. I'll close the MR where we worked on just doing that.
The changes I've pushed to the surviving MR:
.or-both of which can be dangerous.SecurityFileUploadEventSubscriber, notFileEventSubscriber- because it already runs last, already strips null bytes unconditionally, and already flagssetSecurityRename().I think this achieves what this issue set out to do - namely disallowing dangerous characters in filenames (mostly in the context of command injection and XSS).
There are no update hooks, and none are needed. These protections aren't configurable, so there's no config to migrate - every site gets them as soon as this lands. That's one advantage over changing a
filename_sanitizationdefault, which would only have applied to new installs (and/or required update hooks etc..).Existing filenames aren't touched; sanitisation only runs on upload, so this applies to newly uploaded files. Retrospectively renaming existing files is out of scope (could be done in contrib?).
Comment #59
alexpottI really like the new approach. It looks good and is well tested.
Comment #60
cmlaraThat is a significant change from the previous versions of this MR (surprised it’s not called out as a change pushed to the MR).
I would suggest caution on rushing this into 12.0 during beta1 week (I get the vibe that is the intent from the Slack thread) especially since it was generated by AI without humans being deeply involved.
The configurable version was nice in that it allowed choosing some characters that may be common (ampersand) that impact readability.
Noted previously, i’m still not personaly a fan of stripping out characters that would exist in legitimate file names just because some developers downstream lack basic developer skills regarding exec() calls and shouldn’t be writing PHP code especially since this (according to the description) only protects at upload and does nothing for existing or future renamed files.
While this will close one vector IMO it is likely to make developers become accustomed to entity file names being “safe” potentially increasing the number of locations a command injection could occur (“no need to shell escape argument that’s already been filtered” mindset) or cause the DST to rate it “complex and unworthy of an advisory” leading to more publicly exploited command injections that site owners are unaware of.
Comment #61
ghost of drupal pasthttps://chx.contact/@chx/117180546919326851
Comment #62
bramdriesenLet us,.. not do that. 🙈
Comment #63
alexpottFWIW I think the latest changes move us closer to the OWASP recommendation around filenames - see https://cheatsheetseries.owasp.org/cheatsheets/File_Upload_Cheat_Sheet.h... - specifically the part where it says
Note: the OWASP bottom line is that the application should use a randomised filename if you don't do this.
Comment #64
ghost of drupal pastThat's what I am saying too. Set to active and hide the MR then?
Comment #65
cmlaraTechnically it suggests always use random and only if you have a business need to keep the filename should you not, the rest are additional suggestions of how to handle those file names if your business need allow for it. This is significantly different than "if you don't do this you need to use random".
We are not using random, thus I presume we are still in agreement there is a business need to keep original filenames and we are just discussing how much of the filename is a business need. I'm not sure Drupal Core can even define this since business need is site specific, which was where the configurable option with a safe sane default (previous MR) had power.
Filenames being renamed by services is always a pain in my experience, not that filenames are authoritative on their own, however when your trying to find the original source of
foo&bar final(1).extwhen all you have isfoobar final1.extit does become a bit of a data mining nightmare.Side note: Now that this removes rather than replaces, you can end up with reputation damaging filenames, eg
Love&War.pdfbecomesLoveWar.pdf. I leave it to your imagination how stripped characters might change other filenames in a way significantly more damaging to a reputation and in a way an unskilled site user will not predict at time of upload.Comment #66
mcdruid commentedWe all have our preferences about filenames; personally I detest spaces in them but they're not a significant security risk by themselves so I'd leave that to configuration.
Shell metacharacters and the components of html tags / attributes are dangerous in filenames. We can say "contrib and custom code should handle this properly" but I don't think it's a defensible position for core to provide a footgun which ends up causing vulnerabilities in numerous contrib modules (and no doubt custom code).
We could throw the net wider, but a quick comparison: WordPress, Joomla and Typo3 all sanitise filenames and do something broadly similar to what's been proposed here (details below).
I'd argue we leave preferences to configurable transliteration settings, but strip outright dangerous characters from filenames unconditionally.. which is what my proposed changes in the MR implements.
Detailed round up of how other CMSes handle filenames:
sanitize_file_name()A-Za-z0-9._-or a space:File::makeSafe()_, accents and emoji survive:LocalDriver::sanitizeFileName()None allow these safety features to be disabled, but there is some configurability via e.g. WP filters.
This MR leaves accents, spaces and emoji alone, so it's the least destructive of the four on legitimate filenames.
Comment #67
alexpott@cmlara great point about the benefits of replacing rather than removing - I agree we should return to the original behaviour of replacing.
With respect to having a user configurable list of characters - I think that that will turn out to be problematic because in order to configure the list the user needs to know everywhere the filename is potentially being used. This makes me quite sympathetic to your point about it really being on the developers writing the downstream code that uses a filename to use it in a safe way.
Maybe a way forward here is to make the list smaller maybe just
" ; #|`from the issue summary - it don't think we should be preventing XSS here - we have twig auto escape for that.And we could file a follow-up to change the default behaviour to replace whitespace.
Comment #68
alexpott#67 was an xpost with #66 - the looking at what other CMS's do is instructive - it makes me more convinced we should do something and it should not be configurable - perhaps the only thing to do here is to swap the removing with replacing...
Comment #69
mcdruid commentedHappy to swap to replacing chars rather than removing; one reason I'd gone with the latter is that we already do that for null bytes but that's a bit different to sanitising a visible character.
We could use the replacement_character from file.settings (and I'd personally prefer a dash to an underscore) but we're in the system module, and that configuration lives in the file module; there's no dependency declared which guarantees file.settings is available here.
On the other hand the system module already uses an underscore as a replacement character elsewhere (later on in the same method in fact), so I've gone with that.
As for reducing the characters we're eliminating; I'd argue against that. Command injection can be achieved with a subshell (even within escaped double quotes) e.g.:
...and ampersands allow chaining commands:
Yes, in both cases the code's not handling the unsafe input correctly, but that's the point of us trying to remove the footgun.
Same with XSS; done properly with twig there shouldn't be a problem.. but the Security Team has seen examples where it's not done properly.
Finally, core already replaces
: * ? " < > |with_inFileSystem::createFilename()but only on Windows, because they're illegal there; characters like< > "can't appear in a portable filename.None of the other CMSes we looked at go with a small subset of potentially bad characters. I'd stand by the ones we've got in the MR currently.
Comment #70
mohit_aghera commentedI have reviewed this issue and the implementation looks good.
Just want to highlight one issue that we are not replacing spaces by default.
We had a discussion in #26
Since we already have a setting in `file.settings.yml`, i think we can skip force replacement.
I agree with @alexpott for #63 and we can skip replacing the spaces.
I think that was the only point which has significant back-n-forth.
I've updated issue summary to reflect that we are okay with keeping space.
I checked the change record doc here https://www.drupal.org/about/core/policies/core-change-policies/change-r...
I believe we aren't introducing any methods as such, do we need any API change record?
Comment #71
mcdruid commentedThanks Mohit!
I think it probably does warrant a CR as it's a fairly noticeable change in terms of UI/UX.
I'll draft one.
Comment #72
mcdruid commentedd'oh
Comment #73
mcdruid commentedDraft CR: https://www.drupal.org/node/3624076
Comment #74
larowlanJust one question on the MR
Comment #75
larowlanDrew answered my questions, restoring RTBC
Comment #76
longwaveTo me this change makes sense and the lack of configuration is the correct way to go. Introducing any configuration to a security related feature means increasing test coverage and having to consider more edge cases while still running the risk of making it less secure in some way or introducing subtle (or not so subtle) bugs.
I also think that this feature embodies Postel's Law/the robustness principle by being liberal in receiving filenames, but then being conservative and protecting our downstream users of our APIs in what we send them.
Comment #77
xjmI added a bit to the CR documenting that existing filenames will not be changed, which we should also include in the release note (which we need since this is a noteworthy behavior change).
Regarding configurability: I agree with @longwave's position. Allowing this to be configured could easily introduce critical security regressions for individual sites or applications. It would also increase the complexity unnecessarily for marginal benefit.
Regarding user experience: While it's of course nicer for end users for the filename to look like what they used, we're already munging, already replacing other dangerous characters, and already supporting human-readable labels for files generally.
Users will also be familiar with this sort of behavior from other applications, as can be inferred from the documentation above of what various other projects are doing. So, I think the risks here vastly outweigh any user experience benefit of making it customizable.
Regarding data integrity and the upgrade path: The only scenario I could come up with where this implementation could be disruptive to data integrity was for migrations, migrating files uploaded before this change into a new site with this change, resulting in hardcoded links in body fields or the like breaking. That in itself is not a reason not to do this, but I do think it is a reason for it to be minor-only and strictly beta-deadlined.
If anyone can come up with other potential disruptions, please document them so we can make sure they get into the CR and release note if appropriate.
Thanks!
Comment #78
larowlanDiscussed in detail amongst security team members (@xjm, @longwave, @mcdruid) and we agreed the benefits here outweigh any disruption.
I'm always wary of regex so reviewed it in detail with regex101 explaining every character to me.
Committed and pushed c30d609d24c to main. Thanks!
Published the change record.
Added a release not snippet.
Comment #81
longwaveDiscussed with @xjm and we think this could also be backported to 11.5 as a security improvement, there's nothing here that restricts it to a major only.
Comment #82
xjmI would add that I think it should be backported; we don't want D11 and D12 to have a different security behavior here if we can avoid it.
It cherry-picks cleanly with an auto-merge, but we should create an MR so we can run tests, per @longwave.
Comment #83
ghost of drupal pastSo this patch uses \p in a security context. However, very long ago PCRE \p support was found to be buggy. I sincerely doubt this survives into PCRE2 seventeen years later but hey! it's software. search has a total test in SearchTextProcessorTest utilizing UnicodeTest.txt. The easiest way to verify would be to reroll Unicode::PREG_CLASS_WORD_BOUNDARY with \p if the test passes then remove the outdated comment too.
Comment #84
larowlanThanks @ghost of drupal past - I opened #3624695: Explore whether \Drupal\Component\Utility\Unicode::PREG_CLASS_WORD_BOUNDARY can be simplified to explore that. This kind of deep system knowledge we as humans retain will always be invaluable.
Comment #85
ghost of drupal pastWell, the problem is if that issue fails then so does this.
Comment #86
larowlanYep - which is what I was confirming - it looks to be passing