BZ1006506 - File name validation broken
(cherry picked from commit 9f6a68d67c317d3c4f707467f7fd365a1602ba47)