Forum Moderators: phranque

Message Too Old, No Replies

Block images from an outside domain?

         

allllll

5:03 pm on Jan 28, 2008 (gmt 0)

10+ Year Member



Hi,
Spammers are hitting a couple of forums I administer and I'd like to at least block the images that they're putting in the posts. The forums are PHPBBs and the spammers are using BBCode to place images that are on their servers into the messages, so the code looks like this:

[img]http://blah blah.info/pon/1.jpg[/img]

Is there a way to block images from another server using htaccess? I'd need to do it using the domain names rather than IPs which probably change.
It's kind of the opposite of blocking hotlinking so it seems like it should be possible but I've been unable to find info.
Thanks!
Albo

jdMorgan

5:22 pm on Jan 28, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There is no way to stop this in your server config, because it is the client browsers loading the images. Since no image request is made to your server, your server can't do anything about it once your page is loaded.

So, you might look into parsing and filtering image links inside your phpBB script, so the links won't be published on your pages.

Jim

JAB Creations

5:58 pm on Jan 28, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could try adding a script to the forum software to scan and remove or edit images that have an absolute post. This could also be done with JavaScript possibly though it's only attacking the weed and not the root.

Your best bet is to block automated bots from registering however. That is what you should be concentrating on. Add a Captcha and add other roadblocks. I'm not sure there is a security specific forum here, perhaps make use of the general forum?

- John

allllll

8:01 pm on Jan 28, 2008 (gmt 0)

10+ Year Member



Thanks for the quick replies, guys.
That makes sense about server requests - I guess I was hoping there was a way to tell my server that a certain text string (a URL in this case) could not be written in anywhere on the site; change it automatically to "spam" or whatever as the "word censor" function does in PHPBB (I tried using "word censor" to block'em but it doesn't work inside BBCode). I can't find anything on the PHPBB site that addresses this. I'd like to be able to at least block the obnoxious images until I can figure out how to block the spammers.
I had a wonderful, total vacation from spammers for more than a year using the mods I have, most successfully with "ban control" function in the User Admin - all of the spammers were using the same few email domains and most of those domains were created to send spam so I blocked them all and had zero spams. Heaven.
Sadly, they have figured that out and are using gmail addresses now.
The battle rages on, and it sure is enraging!
Albo