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

Checking the memory needed before doing the operation #134

Open
nitriques opened this issue Jun 27, 2016 · 0 comments
Open

Checking the memory needed before doing the operation #134

nitriques opened this issue Jun 27, 2016 · 0 comments

Comments

@nitriques
Copy link
Member

This could prevent memory exhaustion attacks.

See http://php.net/manual/en/function.imagecreatetruecolor.php

@nitriques nitriques added this to the 2.1.0 milestone Jun 27, 2016
@nitriques nitriques self-assigned this Jun 27, 2016
nitriques added a commit that referenced this issue Jul 7, 2016
This commits adds a feature that will try do detect if the server has
enough memory to process the request or not.

After loading the original image, if enabled, JIT will estimate the
needed memory in order to execute the demand, like so:

$dst_w * $dst_h * ($number_of_channels + 1) * $factor

The factor value is taken from the 'memory_exhaustion_factor'
configuration value.

When enabled, any errors will get loggued.

By default, this feature is turned off

Fixes #134
Re #133
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant