Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Password that gets escaped (escape set true) fails authentication #49

Open
dustinbolton opened this issue Apr 2, 2017 · 3 comments
Open

Comments

@dustinbolton
Copy link

I happened to have a password to one site containing the string "&". With escape enabled this resulted in a the password sent to lftp being escaped which resulted in authentication failing. I changed the password to work around this but I worry there may be other password escaping glitches with escaping enabled causing lftp to fail to authenticate.

Note that this happened when using execAsStream() if that matters.

@LiamWheldon
Copy link

I've had the exact same issue, it's your comment that diagnosed the issue for me. I tested with raw() ls() and put() looks like every param values must be getting escaped...

Liam

@lopic34
Copy link

lopic34 commented Sep 27, 2021

Same for me too: password with escaped characters make my system impossible to connect.
In my case, the password have this characters :
$);]
(I don't know which one is the "bad one")
Thank to post in this issue, and I solved it by changing the escape parameter to false:

            const ftps = new FTPS({
              host: xxxx,
              port: xxxx,
              username: xxxx,
              password: xxxx, //(contain $);]
              protocol:  xxxx,
              **escape: false,  //it was _true_ by default**
              retries: 3,
              timeout: 20,
              autoConfirm: true
})

I can see there is no update since 3 years, but if this post message can help some of you, it is great!

Except this password problem, this SFTP is well done and works very fine.
A big thank to Sébastien for this great job. Bravo !

@atl3tico
Copy link

atl3tico commented May 17, 2023

That's because you don't want to escape your password. Use bareCredentials option:

const ftps = new FTPS({
              host: xxxx,
              port: xxxx,
              bareCredencials: `${username}:${password}`,
              protocol:  xxxx,
              escape: true,
              retries: 3,
              timeout: 20,
              autoConfirm: true
})```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants