Follow us on Twitter!
Imagination is more valuable than knowledge - Albert Einstein
Friday, April 18, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 17
Guests Online: 15
Members Online: 2

Registered Members: 82822
Newest Member: TheBunter
Latest Articles
View Thread

HellBound Hackers | Computer General | Programming

Author

php upload problem (IE compatibility)


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 22-09-06 18:54
i did a image upload website http://zokio.zapt. . .gehosting/,
the upload script work fine with firefox, but when people try to upload a .jpg file, it says: wrong file type... but when they try with Firefox, it work fine, so can someone help me for my probleme?
heres is a part of my script, if it can help!
Code
$allowed_file_type =
array('image/gif',
'image/bmp',
'image/jpeg',
'application/x-shockwave-flash',
'application/zip',
'application/x-zip',
'application/x-zip-compressed',
'application/octet-stream',
'application/x-compress',
'application/x-compressed',
'multipart/x-zip',
'image/photoshop',
'image/x-photoshop',
'image/psd',
'application/photoshop',
'application/psd',
'zz-application/zz-winassoc-psd',
'application/tga',
'application/x-tga',
'application/x-targa',
'image/tga',
'image/x-tga',
'image/targa',
'image/x-targa',
'image/png',
'image/tif',
'image/x-tif',
'image/tiff',
'image/x-tiff',
'application/tif',
'application/x-tif',
'application/tiff',
'application/x-tiff',
'image/ico',
'image/x-icon',
'application/ico',
'application/x-ico',
'application/x-win-bitmap',
'image/x-win-bitmap',
'application/octet-stream',
'text/plain',
'application/txt',
'browser/internal',
'text/anytext',
'widetext/plain',
'image/jpg',
'widetext/paragraph' );







Edited by on 24-09-06 22:45
Author

RE: php upload problem (IE compatibility)


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 24-09-06 22:47
someone?


Author

RE: php upload problem (IE compatibility)

Mr_Cheese




Posts: 2468
Location: Brighton, UK
Joined: 30.11.04
Rank:
Uber Elite
Posted on 24-09-06 23:07
i cant see why it would fuxor in IE and not firefox, because my guess would be all data would be sent the same regardless of IE or firefox.

perhaps one browser doesnt have JS enabled or something?

not really too sure.


http://www.hellboundhackers.org/
Author

RE: php upload problem (IE compatibility)


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 25-09-06 01:27
theres no javascript on my site so im pretty sure that isnt the problem but damn, this is pretty frustrating!


Author

RE: php upload problem (IE compatibility)


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 25-09-06 01:54
It couldn't be the browser because all server-side scripts are ran on the server. So, I don't know the problem.


Author

RE: php upload problem (IE compatibility)


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 25-09-06 03:02
Actually, it is the browser that sends the content type.

While firefox sends it as "image/jpeg" for a jpg file, I.E. sends it as "image/pjpeg". So just add "image/pjpeg" to the array and it should work fine. Smile


Author

RE: php upload problem (IE compatibility)


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 25-09-06 03:05
Jake knows ALL!


Author

RE: php upload problem (IE compatibility)


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 25-09-06 03:29
hmm...I wonder if there would be a way to spoof this? I mean if the browser sends it, you might be able to upload a different filetype and make the browser say it's image/jpeg or whatever. then maybe you could put, say, php files on an image hosting site.
just a thought. does anybody know if it could work?


Author

RE: php upload problem (IE compatibility)


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 25-09-06 03:44
Good observation. You are right, it could be spoofed.

Just send the headers as:
Code
Content-Disposition: form-data; name="file"; filename="somefile.exe"
Content-Type: image/jpeg

file contents here