Topic "Special Characters in Password"

Author Message
Confused

Guest


I have been given a rather difficult password by one of our suppliers to sftp from an offsite server.

I am trying to use assembly and powershell to connect and I have tested successfully to our own server but looking at the debug log shows its not escaping the special characters in the password - can anyone help?

For arguments sake the password (not the real one) is Tynf^&f34%cvBN

when viewed in the debug log this is being changed to Tynf%5E%26f34%25cvBN

I have tried wrapping the password in double quotes ("Tynf^&f34%cvBN"), single quotes, ive tried replacing the special characters with %25 as in session url but this just translates the % character and the number.

I'm using winscp version 5.7.7.6257 and have been browsing through posts on here for hours so any help is appreciated.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
You should not need to do anything with the password in the .NET assembly. Just assign it as is. Of course, except for symbols which have special meaning in your programming language.

If you have problems, try to enable password logging by calling session.AddRawConfiguration("Logging\LogSensitive", "1") and inspect the log.
See https://winscp.net/eng/docs/rawconfig
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License