From 7e0d9ff21bdac5ac4b64ffca92f9494093d645dd Mon Sep 17 00:00:00 2001 From: "gerv%gerv.net" Date: Fri, 13 Oct 2006 11:27:39 +0000 Subject: [PATCH] Bug 356338 - quick fix to stop some fairly simple spam. Thanks to Frank Wein. --- webtools/hendrix/index.cgi | 6 ++++++ webtools/hendrix/template/error.html.tmpl | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/webtools/hendrix/index.cgi b/webtools/hendrix/index.cgi index d9798564262..f1a300bde2e 100755 --- a/webtools/hendrix/index.cgi +++ b/webtools/hendrix/index.cgi @@ -66,6 +66,12 @@ if (!$action) { || die("Template process failed: " . $template->error() . "\n"); } elsif ($action eq "submit") { + # Simple Mozilla-specific hotfix against spam, 2006-10-13 + if (($form->{'subject'} eq 'LINKS') && + ($form->{'product'} eq 'Firefox 2 Beta 1')) { + throwError("like_spam"); + } + # Format the parameters and send to the newsgroup. # Check for compulsory parameters diff --git a/webtools/hendrix/template/error.html.tmpl b/webtools/hendrix/template/error.html.tmpl index 219f741655b..0cb850ffca1 100644 --- a/webtools/hendrix/template/error.html.tmpl +++ b/webtools/hendrix/template/error.html.tmpl @@ -50,6 +50,12 @@ [% message FILTER html %] + [% CASE "like_spam" %] +

+ Sorry, your message looks like some spam we've been receiving. Please + press Back, change the Summary to something else and try again. +

+ [% CASE DEFAULT %] The error is unknown. Please try again later. [% END %]