silverstripe/silverstripe-framework — pull request #3016 by stecman (2014-04-08 04:09:01+00:00)
Title: Fix formatted image file name assumptions

* The regex used to match filenames in `Image::deleteFormattedImages`
required digits in the filename. These digits were present when using
the `Image::generate*` methods, but are not guaranteed to be present
when using custom resize methods (added by extension). This meant that
the resampled images generated by custom getFormattedImage methods were
not guaranteed to be deleted when `Image::deleteFormattedImages` was
called.

* `Image::cacheFilename` did not sanitise arguments before generating a
filename. This meant it was possible to generate invalid filenames
(for example, containing a slash).