Revision 8169
Added by Jing Tao almost 11 years ago
src/perl/ldapweb.cgi | ||
---|---|---|
78 | 78 |
my $styleSkinsPath = $contextUrl . "/style/skins"; |
79 | 79 |
my $styleCommonPath = $contextUrl . "/style/common"; |
80 | 80 |
|
81 |
#recaptcha key information |
|
82 |
my $recaptchaPublicKey=$properties->getProperty('ldap.recaptcha.publickey'); |
|
83 |
my $recaptchaPrivateKey=$properties->getProperty('ldap.recaptcha.privatekey'); |
|
84 |
|
|
81 | 85 |
my @errorMessages; |
82 | 86 |
my $error = 0; |
83 | 87 |
|
... | ... | |
285 | 289 |
#my $error=null; |
286 | 290 |
my $use_ssl= 1; |
287 | 291 |
#my $options=null; |
288 |
$templateVars->{$captcha} = $c->get_html('6LcUD-cSAAAAANmwhTdCgmcieFk2IEhYGILR93gz',undef, $use_ssl, undef);
|
|
292 |
$templateVars->{$captcha} = $c->get_html($recaptchaPublicKey,undef, $use_ssl, undef);
|
|
289 | 293 |
$template->process( $templates->{'header'}, $templateVars ); |
290 | 294 |
foreach my $tmpl (@{$templateList}) { |
291 | 295 |
$template->process( $templates->{$tmpl}, $templateVars ); |
... | ... | |
329 | 333 |
my $response = $query->param('recaptcha_response_field'); |
330 | 334 |
# Verify submission |
331 | 335 |
my $result = $c->check_answer( |
332 |
"private google key", $ENV{'REMOTE_ADDR'},
|
|
336 |
$recaptchaPrivateKey, $ENV{'REMOTE_ADDR'},
|
|
333 | 337 |
$challenge, $response |
334 | 338 |
); |
335 | 339 |
|
Also available in: Unified diff
Read the recaptcha key from the metacat.properties.