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

Input image exceeds pixel limit #1381

Closed
ishitatsuyuki opened this issue Sep 20, 2018 · 9 comments
Closed

Input image exceeds pixel limit #1381

ishitatsuyuki opened this issue Sep 20, 2018 · 9 comments
Labels

Comments

@ishitatsuyuki
Copy link

libvips is designed to handle any malicious input without crashing, and the same should applies to sharp as well.

Unfortunately, you don't seem to propagate the errors detected in the worker thread.

I see things like:

Error: Input image exceeds pixel limit

and Node just dies with exit code 1.

@lovell
Copy link
Owner

lovell commented Sep 20, 2018

Hello, did you see limitInputPixels?

@lovell lovell changed the title Do not exit process on error Input image exceeds pixel limit Sep 20, 2018
@ishitatsuyuki
Copy link
Author

Yes I know that exists. Removing/widening the limit means you may suffer from DoS, which is a more serious problem. So that's not a solution.

@ishitatsuyuki
Copy link
Author

And please not edit the title to alter the purpose of this issue. The lack of the error handling is the point.

@lovell
Copy link
Owner

lovell commented Sep 20, 2018

"Unfortunately, you don't seem to propagate the errors detected in the worker thread."

Are you referring to Node worker threads? If so, please see #1297

@ishitatsuyuki
Copy link
Author

No, I'm referring to the libuv tasks you spawn.

@lovell
Copy link
Owner

lovell commented Sep 20, 2018

Thanks for confirming, please can you provide a code sample that fails in the manner you describe?

@ishitatsuyuki
Copy link
Author

After some debugging, I found that ts-node was absorbing the cause message (error event on stream) and I found the way to fix it. Sorry for the disruption.

@oleg-koval
Copy link

@ishitatsuyuki can you please share a way you fixed it?

@ishitatsuyuki
Copy link
Author

Sorry I don't remember anything from 4 years ago. You might want to fiddle with ts-node as the past me said.

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

No branches or pull requests

3 participants