- made captcha's harder to defeat by machine

This commit is contained in:
JT Smith 2007-09-14 18:27:29 +00:00
parent 4a5fb31103
commit 5105becce9
2 changed files with 7 additions and 2 deletions

View file

@ -1,5 +1,6 @@
7.4.7
- fix: misspelled i18n in webgui password recovery
- made captcha's harder to defeat by machine
- fix: crash bug in if modified cache checking
- rfe: Change URL of "news" layout to be something else.
- add type variable to Data Form record loop

View file

@ -91,11 +91,15 @@ sub addFileFromCaptcha {
if($error) {
$self->session->errorHandler->warn("Error adding noise: $error");
}
$error = $image->Annotate(font=>$self->session->config->getWebguiRoot."/lib/default.ttf", pointsize=>30, skewY=>0, skewX=>0, gravity=>'center', fill=>'black', antialias=>'true', text=>$challenge);
$error = $image->Annotate(font=>$self->session->config->getWebguiRoot."/lib/default.ttf", pointsize=>30, skewY=>0, skewX=>0, gravity=>'center', fill=>'#666666', antialias=>'true', text=>$challenge);
if($error) {
$self->session->errorHandler->warn("Error Annotating image: $error");
}
$error = $image->Blur(geometry=>"1");
$error = $image->Draw(primitive=>"line", points=>"0,5 105,21", stroke=>'#666666', antialias=>'true', strokewidth=>2);
if($error) {
$self->session->errorHandler->warn("Error drawing line: $error");
}
$error = $image->Blur(geometry=>"9");
if($error) {
$self->session->errorHandler->warn("Error blurring image: $error");
}