List Info

Thread: Re: Intelligent Moinmoin wiki spam bot




Re: Intelligent Moinmoin wiki spam bot
country flaguser name
Japan
2007-02-19 22:00:28
Gnarlodious wrote:
> On 2/18/07, Tim Bird wrote:
> 
>> I have now disallowed
>>uploading .html files on my site.
> 
> How did you do that? I can find no information on it.

I modified MoinMoin/action/AttachFile.py as follows:

--- AttachFile.py.orig  2007-02-20 12:51:30.000000000 +0900
+++ AttachFile.py.new   2007-02-20 12:53:02.000000000 +0900
 -492,6
+492,14 
      #            ext = ''
      #    target = target + ext

+    # TRB -2/9/2007 - disallow uploading .html files
+    # this is to thwart one obnoxious spammer
+    if target.find(".html") != -1:
+        msg = _("Attachment '%s' not allowed.") %
target
+        # return attachment list
+        upload_form(pagename, request, msg)
+       return
+
      # get directory, and possibly create it
      attach_dir = getAttachDir(request, pagename,
create=1)
      # save file

=============================
Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Electronics
=============================


------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Moin-user mailing list
Moin-userlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/moin-user


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )