From 704fc61b0a260a70ec63ec451eef2b027fe699be Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Sun, 24 May 2009 18:37:42 +0200 Subject: [PATCH] regproj: Change anti-captcha to nearest planet test --- cgi/regproj.cgi | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/cgi/regproj.cgi b/cgi/regproj.cgi index 41a1d79..78f77bc 100755 --- a/cgi/regproj.cgi +++ b/cgi/regproj.cgi @@ -23,11 +23,6 @@ if ($fork) { $name = "$fork/$name"; } -if ($cgi->param('mail')) { - print "

Go away, bot.

"; - exit; -} - if ($cgi->param('mode')) { # submitted, let's see # FIXME: racy, do a lock @@ -37,6 +32,11 @@ if ($cgi->param('mode')) { $name =~ /\.git$/ and $gcgi->err("Project name should not end with .git - I'll add that automagically."); + if (lc($cgi->param('mail')) ne lc('sun')) { + print "

Sorry, invalid captcha check.

"; + exit; + } + my $mirror = $cgi->param('mode') eq 'mirror'; if ($mirror and $Girocco::Config::mirror_sources and not $cgi->param('url')) { @@ -257,7 +257,10 @@ print $mirrorentry; $gcgi->print_form_fields($Girocco::Project::metadata_fields, undef, @Girocco::Config::project_fields); print <Anti-captcha (leave empty!): +EOT + +print <Anti-captcha - please enter name of our nearest star: -- 2.11.4.GIT