cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Password is written along with the error message.

From: Arun K Khandelwal <akhandel_at_in.ibm.com>
Date: Fri, 12 Mar 2004 14:16:55 +0530

On Fri, 12 Mar 2004, Arun K Khandelwal wrote:

> > I am using curl lib for ftp. When curl_easy_perform() function of
curl
> > lib fails it writes the error message along with the password to the
error
> > buffer "errorMsg". This error message buffer is set by curl lib
function
> > curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errorMsg);
> >
> > I do not want to have password with this error mesage. Is there any way
of
> > doing this? Please note that when curl_easy_perform do not fails it
does not
> > write the password in errorMsg.

> > I completely understand you not wanting this. I don't think anyone
does.
> > Can you be a little more specific in what failure you get when the
password
> > ends up in the errormsg buffer? It surely doesn't get there for all
possible
> > errors.

Hi,
 Here is the error message written in error buffer.

< 220 tcaix FTP server (Version 4.1 Thu Sep 12 23:46:23 CDT 2002) ready.
> USER testc5d7
< 331 Password required for testc5d7.
> PASS mypassword
< 230-Last unsuccessful login: Sat Feb 21 07:51:32 EST 2004 on *********
< 230-Last login: Thu Mar 4 03:02:41 EST 2004 on /dev/pts/2 from
***********
< 230 User testc5d7 logged in.
* We have successfully logged in
> PWD
< 257 "/home3/testc5d7" is current directory.
* Entry path is '/home3/testc5d7'
* Connected to tca********** ((nil))
> CWD /home/testc5d7/arun/test
< 550 /home/testc5d7/arun/test: A file or directory in the path name does
not exist.

Password is written in the following case also:

< 220 tcaix FTP server (Version 4.1 Thu Sep 12 23:46:23 CDT 2002) ready.
> USER testc5d7
< 331 Password required for testc5d7.
> PASS mypassword
< 230-Last unsuccessful login: Sat Feb 21 07:51:32 EST 2004 **********
< 230-Last login: Thu Mar 4 05:19:45 EST 2004 on ftp from ***********
< 230 User testc5d7 logged in.
* We have successfully logged in
> PWD
< 257 "/home3/testc5d7" is current directory.
* Entry path is '/home3/testc5d7'
* Connected to tca************ ((nil))
> CWD /home3/testc5d7/arun/test
< 250 CWD command successful.
> EPSV
< 500 'EPSV': command not understood.
> PASV
< 227 Entering Passive Mode (9,42,************)
* Connecting to 9.42.**************((nil)) port 34336
* Connected the data stream with PASV!
> TYPE I
< 200 Type set to I.
> TYPE a
< 200 Type set to A; form set to N.
> SIZE Zero.txt
< 213 0
> RETR Zero.txt
< 150 Opening data connection for Zero.txt (0 bytes).
* Getting file with size: 0
< 226 Transfer complete.
* Connection #0 left intact

Thanks ,
arun
Received on 2004-03-12