Click here to Skip to main content
15,884,177 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to upload .tif images .how do i validate the upload from some one who can upload .exe file by changing its extension to .tif.Is any way to avoid such attack in vb.net.
thank you..
Posted

1 solution

TIFF can be detected by peeking at first bytes http://local.wasp.uwa.edu.au/~pbourke/dataformats/tiff/

The first 8 bytes forms the header. The first two bytes of which is either "II" for little endian byte ordering or "MM" for big endian byte ordering.
 
Share this answer
 
Comments
__TR__ 27-Aug-12 7:18am    
My 5!
Manas Bhardwaj 27-Aug-12 7:21am    
thx1
vishal_h 27-Aug-12 7:39am    
Is there any example for this in vb.net..
Manas Bhardwaj 27-Aug-12 8:35am    
there should be many on internet. :)
Prasad_Kulkarni 27-Aug-12 8:17am    
5'ed :D

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900