Skip to content
This repository has been archived by the owner. It is now read-only.

Input sanitization: Limits on size and intensiveness of output of GraphicsMagick #57

Closed
karlht opened this issue Sep 11, 2014 · 6 comments
Closed
Assignees

Comments

@karlht
Copy link

@karlht karlht commented Sep 11, 2014

Reference: http://www.graphicsmagick.org/GraphicsMagick.html

Under the 'Environment' section of the above man page, we should consider setting most if not all of the MAGICK_LIMIT_* variables, so that e.g. a very small PostScript input doesn't wind up rasterizing to a multi-gigabyte output.

Other resource-limiting schemes may also be good to have; it would be good if one misbehaving conversion did not bring all other avatar uploading to a screeching halt, for instance.

Does anyone else have any other specific concerns around input/image validation/sanitization?

@seanmonstar
Copy link
Member

@seanmonstar seanmonstar commented Sep 29, 2014

any recommended settings (names and defaults) and I'll add them.

@seanmonstar
Copy link
Member

@seanmonstar seanmonstar commented Oct 6, 2014

@karlht ping?

@karlht
Copy link
Author

@karlht karlht commented Oct 6, 2014

Chatted with jrgm about this last week but ran out of time to get some limits written down. I'll get some suggestions recorded in this issue tomorrow or Wednesday.

@karlht
Copy link
Author

@karlht karlht commented Oct 8, 2014

My suggestions (per invocation):
disk -- 2MB
files -- 8
map -- 2MB
memory -- 1MB
pixels -- 16K
threads -- 8

/cc @jrgm -- he may have different ideas about what's reasonable.

@shane-tomlinson
Copy link
Member

@shane-tomlinson shane-tomlinson commented Sep 28, 2015

From triage, at a minimum, we should restrict file size and file type.

@rfk rfk added this to the FxA-0: quality milestone Sep 30, 2015
@rfk
Copy link
Member

@rfk rfk commented Sep 30, 2015

Since we're now seeing lots more traffic on avatar endpoints, let's prioritize this

seanmonstar added a commit that referenced this issue Oct 19, 2015
Closes #57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants