Throw exception in \Drupal\Core\StreamWrapper\PrivateStream::getDirectoryPath() when basepath() is null

Created on 29 September 2021, about 3 years ago
Updated 7 June 2024, 4 months ago

Problem/Motivation

Follow-up from #3239761-16: Fix MimeTypeTest to prevent deprecations in PHP 8.1 and fix \Drupal\Core\StreamWrapper\PrivateStream::basePath() documentation

Steps to reproduce

The \Drupal\Core\StreamWrapper\PrivateStream::getDirectoryPath() could get NULL from basepath() method as #3239761: Fix MimeTypeTest to prevent deprecations in PHP 8.1 and fix \Drupal\Core\StreamWrapper\PrivateStream::basePath() documentation documents

Proposed resolution

throw exception to prevent access to / (root file system) when accessing non configured private files

Remaining tasks

review, patch, commit

User interface changes

tbd

API changes

tbd

Data model changes

no

Release notes snippet

tbd

📌 Task
Status

Active

Version

11.0 🔥

Component
File system 

Last updated about 6 hours ago

Created by

🇫🇷France andypost

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024