simon-git: putty (main): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Sun Nov 24 15:46:02 GMT 2024


TL;DR:
  5a9f8c30 f_open: use non-Unicode pathnames on legacy Windows.
  0b4f758e Windows: make is_interactive() match Unix.

Repository:     https://git.tartarus.org/simon/putty.git
On the web:     https://git.tartarus.org/?p=simon/putty.git
Branch updated: main
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2024-11-24 15:46:02

commit 5a9f8c30629bb46faabf24c162b9db7cb8ab3084
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=5a9f8c30629bb46faabf24c162b9db7cb8ab3084;hp=b5fe588bace1f803fa5112fd4c41ba3ec3f4f480
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Nov 24 10:58:15 2024 +0000

    f_open: use non-Unicode pathnames on legacy Windows.

 windows/utils/filename.c | 9 +++++++++
 1 file changed, 9 insertions(+)

commit 0b4f758e8a5e87eafa04fd05313e153372481aee
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=0b4f758e8a5e87eafa04fd05313e153372481aee;hp=5a9f8c30629bb46faabf24c162b9db7cb8ab3084
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Nov 24 14:48:17 2024 +0000

    Windows: make is_interactive() match Unix.
    
    This reverts the change to is_interactive() by commit 80aed962862ec73,
    which switched it to using the new conio system. Now we're back to
    doing it the same way as we used to: we check if stdin is a console.
    
    The only use of is_interactive() on Windows is deciding whether to
    present the console antispoof prompt. (On Unix it has an additional
    use in cmdgen, for deciding whether to emit progress reports, but on
    Windows that doesn't come up).
    
     On Unix this is based on stdin being a tty, which means that a
     command such as "plink host do stuff </dev/null" omits the antispoof
     prompt. That's deliberate: the prompt is to defend against attacks
     where the user sends interactive input to the SSH session channel
     believing it to be directed at userauth, but if the input _isn't_
     coming from the interactive terminal where the user is answering
     userauth prompts, then they can't do that even if they are fooled.
    
    On Windows, I think the same argument applies, now that we're reading
    userauth prompts from the console in the same way as Unix. So
    is_interactive() now does the analogous thing on Windows.
    
    Conveniently, this _also_ means is_interactive() is back to exactly
    how it was before the conio rewrite, which means it's one fewer thing
    that can unexpectedly change and break someone's workflow. (Otherwise
    I might also have wanted to change its behaviour based on
    -legacy-stdio-handling, which would be extra ugly.)

 windows/console.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)



More information about the tartarus-commits mailing list