mime checking v24

See all posts See thread Reply

Re: mime checking v24 new!
by rr1024, 17 years, 4 months ago
1. How do you do code highlighting in this forum?

2. On this topic:
Note that the php file that I changed to jpg could not execute as is of course....so to all who are wondering it's still a safe class!!!

3. However, I believe, if I'm using the class correctly?, then there should be TWO checks for the mime type to validate the file before it get's moved to the public directory.
A) The current initial check which seems to be received from the browser and then a second check when the file reaches the phptemp directory....

4. Oh one other minor thing
$handle->file_overwrite  = TRUE;
When I tell it to overwrite the file it doesn't it keeps appending with _NN

Anyway...Love this class !!!Reply
Re: mime checking v24 new!
by colin, 17 years, 4 months ago
1. You have to use the following code:
// your code here

2. The image will be executable depending on the server configuration. Generally, the picture will not be executed through PHP, and will be served as an image.

3. I will check all of that, and post the results here.

4. You also need to deactivate file_auto_rename, as following:
$handle->file_overwrite  = TRUE;
$handle->file_auto_rename  = FALSE;
Reply