PxPlus User Forum

Main Board => Discussions => Language => Topic started by: Peter.Higgins on May 16, 2022, 03:47:30 PM

Title: "*web/ftp;send"
Post by: Peter.Higgins on May 16, 2022, 03:47:30 PM
I have a password with $ special character and passing this as a argument doesn't work.
Any suggestions appreciated.
Tried adding single quotes around pswd and url encoding the $ but this doesn't work.
Title: Re: "*web/ftp;send"
Post by: Devon Austen on May 16, 2022, 04:19:23 PM
Try putting a backslash before the $ i.e. \$.
Does that work?
Title: Re: "*web/ftp;send"
Post by: Peter.Higgins on May 16, 2022, 04:29:09 PM
Devon,
It does not. The line is still returning curl: (67) Access denied: 530
Title: Re: "*web/ftp;send"
Post by: Peter.Higgins on May 16, 2022, 04:51:43 PM
Devon,
It did work.  Sorry for the wrong answer.  Those single quotes were not noticed on the first attempt.
Thank you.
Title: Re: "*web/ftp;send"
Post by: Devon Austen on May 16, 2022, 05:00:12 PM
Yes single quotes are unnecessary as we pass the username and password to curl surrounded in double quotes already.

curl -u "username:password"

I am surprised that a $ needed to be escaped since we do pass it in the double quotes. We will have to look into what characters are special and escape them automatically if possible.