Skip to content

Commit b49df79

Browse files
committed
bug #54863 [Process] Return false when open_basedir prevents access to /dev/tty (mjauvin)
This PR was merged into the 6.4 branch. Discussion ---------- [Process] Return `false` when `open_basedir` prevents access to `/dev/tty` | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no If open_basedir restrictions are in effect, checking if the file /dev/tty is writable will prevent setting tty mode on the process, and avoid failing to create a Process. Fixes #54874 Commits ------- 825e38b Return false in isTtySupported() when open_basedir restrictions prevent access to /dev/tty.
2 parents 95a9bd7 + 825e38b commit b49df79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Process/Process.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1211,7 +1211,7 @@ public static function isTtySupported(): bool
12111211
{
12121212
static $isTtySupported;
12131213

1214-
return $isTtySupported ??= ('/' === \DIRECTORY_SEPARATOR && stream_isatty(\STDOUT));
1214+
return $isTtySupported ??= ('/' === \DIRECTORY_SEPARATOR && stream_isatty(\STDOUT) && @is_writable('/dev/tty'));
12151215
}
12161216

12171217
/**

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy