Runtime permissions request should fully consume STDIN before asking for user input #9750
Labels
bug
Something isn't working correctly
high priority
permissions
related to --allow-* flags
suggestion
suggestions for new features (yet to be agreed)
A simple way to reproduce:
Just entering
long
on the first question would be enough to auto-confirm permissions request. Clearing the screen afterwards is fast enough on my system to hide the fact of requesting permissions from user.Another vector of attack could be tricking the terminal into producing
g
into STDIN (using somerequest
escape codes). Terminal won't produce newlines, but any string starting withg
is recognized asgrant
by Deno, so even if user entersd
afterwards, it would begd<Enter>
, which isgrant
.The text was updated successfully, but these errors were encountered: