I don't know what you are trying to accomplish with this kind of answers
Your previous replay was:
that is not true..... .htm, .html, .jpg,. gif,.bmp,.png,...etc..extensions...etc....are all very important in the linux file systemAnd now you are saying that extensions are not important, and what's important is the file permission (The same idea I have explained in my replay just right before yours)
...sure it does..... but that is because the Ubuntu Desktop handles it all for you..... as a matter of fact, your only problem may be that you have a destop setting set to hide file extensions, like they do on WinblowsAs I wrote those images uses no extensions I have deleted the extensions myself, so I am not confused with anything as you think.
And finally I have no problem with anything as you thought, I am just providing a code that might benefit someone else.
As *some* people uses file extension to determine the file type which I do not consider as a good practice.
About the permission thing: Just because you *think* your files are safe it does not mean it is, consider a web server (Apache for example) that is running scripts without suexec enabled , everybody on that server will have to grant group permission to the web server in order to let it execute those scripts.
That's just one of many examples, just keep in mind that we're humans and we're prone to mistakes & you should always expect the worst thing to happen.
Finally, by adding few more checking to your code ... You are not only protecting yourself from being cracked, You are protecting other users on the shared environment you are working on. And possibly the entire server from being rooted.
Finally I am not here to discuss Linux configurations & security issues. And I will skip answering any more replays to this node.
BTW, Thanks for the MIME types url you posted as again you proved my point, take a look yourself
In reply to Re^4: Answer: How do I find the type of an image?
by ahmad
in thread How do I find the type of an image?
by ahmad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |