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

Warning on connect() method - Buffer() is deprecated due to security and usability issues #231

Closed
PedroS11 opened this issue May 13, 2020 · 7 comments
Labels
more info More details required. Waiting on additional information from OP

Comments

@PedroS11
Copy link

PedroS11 commented May 13, 2020

Hi,

I'm using the version 4.1.3 from ssh2-sftp-client and when I call the connect() method I get the following warning:

Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

I check your code and I couldn't find any statement with Buffer() so I found it was this package concat-stream. Can you help?

Pedro

@theophilusx
Copy link
Owner

theophilusx commented May 13, 2020 via email

@PedroS11
Copy link
Author

Sorry I misspelled the version, I'm using 5.1.2 version and error remains because it comes from this package concat-stream. They are using Buffer() constructor instead of Buffer.from(). There's even a PR to fix this for more that a year PR.
I found a fork from this repo that may fix this warning node-concat-stream.

@theophilusx
Copy link
Owner

theophilusx commented May 13, 2020 via email

@PedroS11
Copy link
Author

That would be awesome, let me know if you fix it and create a new version so that I can use this package in a project because this package is really good, congrats.

@theophilusx
Copy link
Owner

theophilusx commented May 16, 2020 via email

@PedroS11
Copy link
Author

I'm using v12 but now I don't get the error anymore (testing on personal computer). On Monday I will try again with everything set up and I let you know if the error still exists. Thanks

@theophilusx theophilusx added the more info More details required. Waiting on additional information from OP label May 19, 2020
@PedroS11
Copy link
Author

I can't replicate the problem again, don't know what happened but in the next days I will use others methods from this package and I let you know if I get it again. You can close the issue and sorry for the time lost

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more info More details required. Waiting on additional information from OP
Projects
None yet
Development

No branches or pull requests

2 participants