What Will They Think of Next?
I have no idea what the crapflooders are up to these days. They’ve gone on to greener pastures, or easier victims, or maybe Mommy finally discovered what they were doing during those long hours in front of the 'puter. I don’t know and I really don’t care.
But the MovableType Search facility is a processor-hog. It would be trivial to write a “searchflooding” script which would deluge your blog with search requests. To keep this from DoS’ing your server, it seems best to impose a throttle of 5 simultaneous searches at any one time. Here’s a patch to do that. If running patch is too difficult, here’s a drop-in replacement for lib/MT/App/Search.pm .
Share and enjoy.
Posted by distler at January 30, 2004 11:03 PM
TrackBack URL for this Entry: http://golem.ph.utexas.edu/cgi-bin/MT-3.0/dxy-tb.fcgi/304
Re: What Will They Think of Next?
I know I’m just dreaming, but it sure would be nice if MT was a typical, community-based open source project and we could get some of these nice patches committed into their CVS repository. Have you ever tried submitting patches to Ben?
Re: What Will They Think of Next?
Can the replacement search.pm file be dropped-in to any version of MT [beyond whichever version first had the integrated search]?
Re: What Will They Think of Next?
Thanks for the search throttle. I’ve been needing something of the sort anyway, since MT’s built-in “multiple searches from one IP” throttle return an error on all search attempts, so I’ve had to comment it out. I’ve no idea why it does this, and should probably dig into it someday, but meanwhile this looks to be a solution.
Read the post
FeedDemon & Search Throttling
Weblog: Eclectic Echoes
Excerpt: Finally found a few dollars to purchase Nick Bradbury’s FeedDemon. I tested a number of other feed readers out during the past couple of months, and while there are a few things some of them had that I would like to see integrated into FeedDemon&...
Tracked: February 1, 2004 11:36 AM
Throttle me? Throttle you!
Since mt-throttle.db lives in $cfg->TempDir, which defaults to /tmp, on a shared server with several MT installs, the patch actually can work as a DoS: keep banging away on your own search, so mt-throttle.db always has too many entries, and nobody else with a patched Search.pm can use their search.
Re: What Will They Think of Next?
Forgive my ignorance, but do I just copy this: http://golem.ph.utexas.edu/~distler/blog/files/search_throttle.patch
and stick it somethere in my existing mt-search.cgi? Or do I save it as something else and stick it in a directory?
Thanks!
Re: What Will They Think of Next?
I know I’m just dreaming, but it sure would be nice if MT was a typical, community-based open source project and we could get some of these nice patches committed into their CVS repository. Have you ever tried submitting patches to Ben?