Homec4science

Implement new profile transform with amazing "error handling" feature

Authored by epriestley <git@epriestley.com> on May 12 2015, 19:50.

Description

Implement new profile transform with amazing "error handling" feature

Summary:
Ref T7707. Ref T4406. Ref T2479. This implements the profile-style (fixed width and height) transforms in a modern way.

  • Added a "regnerate" feature to the support UI to make testing easier and surface errors.
  • Laboriously check errors from everything.
  • Fix the profile thumbnailing so it crops properly instead of leaving margins.
  • Also defuses the "gigantic white PNG" attack.

This doesn't handle the imagemagick case (for animated GIFs) yet.

Test Plan:

  • Uploaded a variety of wide/narrow/small/large files and converted them into sensible profile pictures.
  • Tried to thumbnail some text files.
  • Set the pixel-size and file-size limits artificially small and hit them.
  • Used "regenerate" a bunch while testing the rest of this stuff.
  • Verified that non-regenerate flows still produce a default/placeholder image.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T4406, T2479, T7707

Differential Revision: https://secure.phabricator.com/D12811

Details

Committed
epriestley <git@epriestley.com>May 13 2015, 20:38
Pushed
aubortJan 31 2017, 17:16
Parents
rPHa19b0029e223: Fix bad aspect ratio on some file previews
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH2bdb5404c7e9: Implement new profile transform with amazing "error handling" feature (authored by epriestley <git@epriestley.com>).May 13 2015, 20:38