Skip to content

Commit b9ec538

Browse files
committed
Change Some Comment Verbiage
1 parent 0d9203b commit b9ec538

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org). Thia is a
99

1010
### Security Note
1111

12-
- A prior change had attempted to eliminate the ability to use input files using the phar protocol. Some filenames using that protocol were not caught by the earlier change. That is now fixed. The failure to detect these files *did not* lead to a security exposure in PhpSpreadsheet. However, if you relied on "PhpSpreadsheet can read the file" as a surrogate for "it is safe to read the file's metadata", you should not do so. [PR #4876](https://github.com/PHPOffice/PhpSpreadsheet/pull/4876)
12+
- File::prohibitWrappers and Drawing::setPath now reject phar paths with extra leading slashes (e.g. phar:///…) that escaped the prior parse_url-based filter. No security exploit was possible even with the extra slashes. [PR #4876](https://github.com/PHPOffice/PhpSpreadsheet/pull/4876)
1313

1414
### Added
1515

src/PhpSpreadsheet/Shared/File.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,12 @@ public static function temporaryFilename(): string
134134
}
135135

136136
/**
137-
* All filenames starting with protocol (e.g. phar://) are prohibited.
137+
* Blocks phar:// and similar RCE-bearing wrappers.
138138
* Note that many protocols, including http and zip, will already
139139
* return false for is_file.
140140
* A whitelist of protocols may be added if needed in future.
141+
* data: is intentionally allowed (see #4823); callers needing strict
142+
* on-disk-only semantics must validate $filename themselves.
141143
*/
142144
public static function prohibitWrappers(string $filename): void
143145
{

0 commit comments

Comments
 (0)