input check in file download statistic

it's not in issue in the core but if someone uses the method
getDownloadStatistics and allows the user to specify the limit,
we're opening a security hole.