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

DeprecationWarning: Ftp.raw[user](args): Use Ftp.raw('user args') instead. #226

Closed
SuThaw opened this issue Feb 2, 2017 · 17 comments
Closed

Comments

@SuThaw
Copy link

SuThaw commented Feb 2, 2017

When I use ftp.auth method, this deprecation warning appear. is there anyway to do authentication. my code is following.

const connect = (server) => new Promise((resolve,reject)=>{
	
	// create new ftp server with r	
	const ftp = new JSFtp({
		host: server.host,
		port: server.port || 21,
		user: server.user,
		pass: server.pass,
		debugMode: true
	});	
		

	ftp.on('error',function(err){
		if(err.code == 530 ) reject({status: true, err: 'invalid user credential'});
		if(err.code == 'ENOTFOUND') reject({status: true, err: 'invalid host'});
		reject({status: true,err:'criteria is not correct. cannot connect to server' });
	});

	ftp.on('connect',function(err){
		
		ftp
			.auth(server.user,server.pass,(err,data) => {
				if(err)	reject({ status: true, err: 'Error: 530 Login incorrect'});

				resolve(ftp);
			})
		// resolve(ftp);
	})
});


@joaopedroft
Copy link

It happens the same with me :(

@svenbw
Copy link

svenbw commented Feb 8, 2017

This is caused by the auth function itself for user look at line 334, for password its line 340 and for type it's line 349.
They should be changed to self.raw('user ' + user, function(..., self.raw('pass' + pass, function(... and self.raw('type I', function(....

@marcelorisse
Copy link

This was already fixed and it is merged on master: 35a8edd. Could anyone release a new version so we stop receiving these warnings, please?

@SuThaw SuThaw closed this as completed Feb 27, 2017
@leizhao4
Copy link

Bump. Can we have a new release, please?

@julkue
Copy link

julkue commented Mar 12, 2017

Receiving this warning too. Bump.

@daniel-johnson
Copy link

daniel-johnson commented Mar 22, 2017

Receiving. Bump.

@adamgedney
Copy link

Same here

@simonh1000
Copy link

Although this has been closed the lines referred to by @svenbw remain unaltered in the version distributed via npm. I think the new code needs to be npm published

@leizhao4
Copy link

leizhao4 commented May 2, 2017

Bump @sergi

@kunokdev
Copy link

kunokdev commented May 3, 2017

+1, are moderators of this library active or should we fork ?

@SuThaw SuThaw reopened this May 3, 2017
@juampi92
Copy link

juampi92 commented May 8, 2017

Guys, it's just a simple push to npm publish.... please

@simonh1000
Copy link

Bump @sergi

@littledu
Copy link

Guys, it's just a simple push to npm publish.... please

@hurick
Copy link

hurick commented May 22, 2017

Bump @sergi

@jazoom
Copy link

jazoom commented May 24, 2017

It's been four months now. Is there a fork of this library that will be kept updated going forward?

@sergi
Copy link
Owner

sergi commented Jun 8, 2017

Released v2.0.0. Really sorry for the wait, personal stuff got in the way.

@sergi sergi closed this as completed Jun 8, 2017
@hurick
Copy link

hurick commented Jun 8, 2017

Thank you so much for the update, @sergi.

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