alphagov/whitehall — pull request #1455 by tekin (2014-05-02 16:54:05+00:00)
Title: Don't check folder names against file whitelist

Tracker: https://www.pivotaltracker.com/story/show/68881484

Previously, AttachmentUploader::Zipfile#filenames was returning the path to both files and folders, which would cause problems when a folder name contained a "." in it. This is because everything after the "." was
treated as a file extension and checked against the whitelist. For example, given "some/folder/xml_schema_v2.4/", the file extension validation would treat ".4/" as the file extension and thus the zipfile would flunk validation. This enhances the code that grabs the filenames from the zip so that it's only the filenames that are returned, and not any folders.