Skip to content

Conversation

@spixi
Copy link

@spixi spixi commented Feb 19, 2017

Copying stderr into the output file may cause invalid files and also expose information about the server. stderr must not be copied into the output file.
See here for an invalid jpg which was generated by simple-captcha. After removing the trailing payload up the the JFIF magic string, the file is actually a valid jpeg containing a working captcha. https://gist.github.com/spixi/fccdd98e51336e0e9230b2a2741dac56

Copying stderr into the output file may cause invalid files and also expose information about the server. stderr must not be copied into the output file.
See here for an invalid jpg which was generated by simple-captcha. After removing the trailing payload up the the JFIF magic string, the file is actually a valid jpeg containing a working captcha. https://gist.github.com/spixi/fccdd98e51336e0e9230b2a2741dac56
@zealot128
Copy link
Member

That's true, the command handling is not very safe.

What happens now, when there is an error with processing, like missing Imagemagick version, disk full etc? Does that error get somehow passed upon?

I think the best way would be, to use a full-blown command wrapper, like popen3 to capture stdout/sterr independently though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants