Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(runtime): mitigate permission prompt stuffing #9813

Closed
wants to merge 1 commit into from

Conversation

bnoordhuis
Copy link
Contributor

Flush the tty's input buffer before reading to avoid already typed
characters from being treated as the answer to the permissions prompt.

Fixes #9750.


An orthogonal issue is putting the tty into a known-good state (and restoring it afterwards) with tcsetattr().

Flush the tty's input buffer before reading to avoid already typed
characters from being treated as the answer to the permissions prompt.

Fixes denoland#9750.
@bnoordhuis bnoordhuis requested a review from kitsonk March 17, 2021 08:18
@kitsonk
Copy link
Contributor

kitsonk commented Mar 18, 2021

Looks like this causing hangs in the tests on the *NIX systems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Runtime permissions request should fully consume STDIN before asking for user input
2 participants