Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Max File Extension Length

Tags:

Is there a maximum lengh for a file extension? The longest one I've seen is .compiled (8 chars)

Useless Background

I'm creating a IHttpHandler to return image icons for a specific filename. I'm simply calling a FileImage.axd?ext=pptx. I'm generating the files on the fly using SHGetFileInfo similar to my post for WPF, then caching them locally in a folder with the filename 'pptx.png'. I'd like to validate the length and trim it to prevent a DoS type attack where someone would try to generate images for and infinite number of junk characters (eg FileImage.axd?ext=asdfasdfweqrsadfasdfwqe...).