alphagov/whitehall — pull request #584 by h-lame (2013-06-03 16:43:37+00:00)
Title: Stop creating imported attachments with names like blah.pdf.pdf

The bug was that File.extname('blah.pdf') returns '.pdf' and we compare that against a whitelist of the form ['pdf', 'csv', ...]. We have to strip the trailing '.' before comparing against the contents of the whitelist.

Don't think there's a pivotal for this, but @yahoopete mentioned it.