Avoid .php in [IMG]

  • Thread starter Thread starter account8226
  • Start date Start date
A

account8226

Guest
Hello, I would like help about a famous bug that happen on any forum software.

That bug is the following :
- A user made a PHP pages on his own server, that steel any visitor's IP adress.

That user embed that pages in BB Code.

So, is there a way to forbid for example .php codes. Is there a way to fix that withou disabling the whole IMG BB Code.

Regards.
 
even if you forbid php files, the "bad boy" could use htaccess to rewrite the url

http://davidejones.com/blog/1126-creating-dynamic-signature-image-php/

also "normal images" like
badteeth.gif
can be used to get your ip address, because it's saved it the server log
 
The problem is that limiting the file extension for IMG locations doesn't protect you. A gif extension can be rewritten to a PHP script. There is no way to protect against this without disabling the IMG tag entirely which requires an addon.

edit - ninjaaaa
 
You don't need to put it in a directory, you can just have a signature.gif that's actually a php file, which stores referrer data to a database, and spit out the real signature.gif. None the wiser.
 
Top Bottom