I maintain a .NET SCP library, and I was wondering how you guys deal with SCP servers that do not support quoting paths.
I have users that want to use our library to download or upload files to MikroTik routers, but these routers do not require quoting paths (more below). However, it's not limited to to the MikroTik routers as I was just able to reproduce the problem with the SolarWinds SFTP/SCP Server.
If you'd enclose the path with single or double quotes (I'm over-simplying it here) with these SCP servers, then you end up with files that effectively have file names that are enclosed with these quotes. This also applies to escaping characters using backslashes (eg. escaping a # with a backslash gives you a file that contains the \" characters).
I don't immediately see how a quoting mechanism can be applied that works for both shell and non-shell based SCP servers.
I maintain a .NET SCP library, and I was wondering how you guys deal with SCP servers that do not support quoting paths.
I have users that want to use our library to download or upload files to MikroTik routers, but these routers do not require quoting paths (more below). However, it's not limited to to the MikroTik routers as I was just able to reproduce the problem with the SolarWinds SFTP/SCP Server.
If you'd enclose the path with single or double quotes (I'm over-simplying it here) with these SCP servers, then you end up with files that effectively have file names that are enclosed with these quotes. This also applies to escaping characters using backslashes (eg. escaping a # with a backslash gives you a file that contains the \" characters).
I don't immediately see how a quoting mechanism can be applied that works for both shell and non-shell based SCP servers.