On Sat, 11 Sep 2004 16:44:29 GMT, Unreal <na**@numb.com> wrote:
Some porn spammer posted some javascript to this board
http://pub.alxnet.com/guestbook?id=2009014
and now it automatically redirects all visitors to an xxx site.
How is he doing this mischief? Is there way to post a 2nd javascript
post that would kill the malicious javascript?
The user has included an image and attached the load intrinsic event to
it. When the image is loaded, his code is called and the page is reloaded
with the new URI.
The simplest way to prevent this is to strip all HTML from input, or
render it harmless by replacing angle brackets with the < and >
entity references. If you do want posters to format their posts, I'd just
do what most forum systems do: define a limited set of character
sequences, like [i] for italics, and replace them with the actual HTML,
<em> or <i> in this case, when the message is uploaded to the server.
If you want more information on how to do this, you're now in the realm of
server-side languages, so you'll need to search for the relevant
newsgroup(s).
By the way, you might want to contact the service provider of that site. I
found their terms and conditions, which specifically prohibits spamming.
It also bans "material that is illegal, libelous, tortuous, or likely to
result in retaliation against Phatservers.net." The adult site might be
deemed to fall under that catagory (I didn't check).
Address your e-mails to
te**@phatservers.net
and
su*****@phatservers.net
but remember to keep the original data. You'll need proof to back-up a
complaint.
Good luck,
Mike
--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.