When performing operations that glob(3) a remote path, ensure that the
authordjm <djm@openbsd.org>
Sun, 8 May 2022 22:32:36 +0000 (22:32 +0000)
committerdjm <djm@openbsd.org>
Sun, 8 May 2022 22:32:36 +0000 (22:32 +0000)
commite353185754db4dc8e27e83fcb7d6001c242cccb9
treef50d91c9bc9fa9a212f90d81f26ab6a4a29e187d
parent4d3e75b6ea9fd7f6cd237cc3d98d05fa55f46468
When performing operations that glob(3) a remote path, ensure that the
implicit working directory used to construct that path escapes glob(3)
characters.

This prevents glob characters from being processed in places they
shouldn't, e.g. "cd /tmp/a*/", "get *.txt" should have the get operation
treat the path "/tmp/a*" literally and not attempt to expand it.

Reported by Lusia Kundel; ok markus@
usr.bin/ssh/sftp.c