#92288Public access can't be denied in GeneratePublicUrlForResourceEvent
Description
> Method: setPublicUrl(?string $publicUrl)
> Description: Sets new public URL of resource – or removes public url (by setting null), disallowing public access.
Calling setPublicUrl(null) in an event listener does not disallow public access.
Perhaps GeneratePublicUrlForResourceEvent should implement StoppableEventInterface so we can force publicUrl = null.
As a workaround publicUrl can be set to an empty string (setPublicUrl('')). But that causes false URI generation using core ViewHelpers (e.g. f:uri.image) with absolute="true".
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Fix this issue
Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch
- Commit message
-
[BUGFIX] Public access can't be denied in GeneratePublicUrlForResourceEvent Resolves: #92288 Releases: main