forked from extern/egroupware
bot-safer contact form
This commit is contained in:
parent
84a9f87127
commit
0c586d9ff0
@ -37,7 +37,9 @@ class addressbook_contactform
|
||||
|
||||
if (is_array($content))
|
||||
{
|
||||
if (isset($content['captcha_result']) && $content['captcha'] != $content['captcha_result'])
|
||||
if (isset($content['captcha_result']) && $content['captcha'] != $content['captcha_result'] || // no correct captcha OR
|
||||
time() - $content['start_time'] < 10 && // bot indicator (less then 10 sec to fill out the form and
|
||||
!$GLOBALS['egw_info']['etemplate']['java_script']) // javascript disabled)
|
||||
{
|
||||
$tpl->set_validation_error('captcha',lang('Wrong - try again ...'));
|
||||
}
|
||||
@ -121,6 +123,7 @@ class addressbook_contactform
|
||||
$content['show'][$name] = true;
|
||||
}
|
||||
}
|
||||
$preserv['start_time'] = time();
|
||||
}
|
||||
$content['addr_format'] = $GLOBALS['egw_info']['user']['preferences']['addressbook']['addr_format'];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user