-
Notifications
You must be signed in to change notification settings - Fork 16
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
[RFC] Limit thumb sizes to config presets (2.x) #28
Conversation
when config thumbnail presets are present, limit allowable sizes to presets.
Added to Tuesday's agenda |
This does not include having the 'key' in the URL, like |
Affirmative, no key in url. Only test that width-x-height size from url is found in allowed presets. Note: preset key in url is currently NOT in the proposal as i see it ! |
This is a new feature on a stable, released branch 👎 |
IMO this is a "security" fix against unlimited thumb requests generating files. |
It's really not a security issue. If you are legitimately worried about someone bringing down your server by requesting a ton of thumbnails, then adding this feature will not prevent that. If this is a problem for the site, use varnish, cloudflare or some other CDN to offload the images. |
@bobdenotter I agree maybe not security but definitely a ddos vector. Really this is no different than drupals DDos vector[1] they patched ~3 years ago where on demand thumbnail generation can bring a site to a halt through so many requests, fill up the disk space, or max out its CPU. Varnish won't "fix" this. These would be dynamic urls, created on request and Varnish wouldn't know about them to cache them, because they don't exist until the request, until after they are generated.
how does an "editor" or "frontend designer" offload thumbnails to a CDN through bolt currently? [1] https://www.drupal.org/SA-CORE-2013-002 [2] Liip Imagine's "signer" https://github.com/liip/LiipImagineBundle/blob/master/Imagine/Cache/Signer.php#L23-L32 |
Closed by consensus as #not-for-2.2 |
This adds the option to limit the amount of image sizes that are allowed to be generated.
It looks if config thumbnails presets are set, and then limits the allowed sizes to those presets.
The presets take the following format (defined in app/config/config.yml under thumbnails)
The sub-array format is choosen in anticipation of bolt/bolt#3703
which might/will allow other parameters (cropping, watermarking) and
which might/will allow usage of presets in twig templates
as parameters for
record.image|thumb(preset_name)