Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b49df79

Browse filesBrowse 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
Copy full SHA for b49df79

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎src/Symfony/Component/Process/Process.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Process/Process.php
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.