Skip to content

Commit 6f9e76b

Browse files
committed
Clarify that only extract() runs the binary through its open handle
1 parent 95e3800 commit 6f9e76b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/NativeExtractor.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,9 @@ private static function inPlaceCommand(string $source): ?string
348348
*
349349
* Swapping the file between the hash check and execution requires write access to that directory, which is
350350
* verified to be only possible for the current user (or root), who could tamper with this PHP process anyway.
351-
* On Linux the race is closed entirely: the verified file stays open and is executed through /proc/self/fd.
352-
*/
353-
/**
351+
* In extract() on Linux the race is closed entirely: the verified file stays open and is executed through
352+
* /proc/self/fd. getCommand() runs it by path on every platform.
353+
*
354354
* @param callable(): string $contents only called when no verified copy exists yet
355355
*/
356356
private function prepareCopy(string $name, string $hash, callable $contents): string

0 commit comments

Comments
 (0)