Skip to content
Snippets Groups Projects
Commit 78e69ebe authored by Jeff Geerling's avatar Jeff Geerling
Browse files

Issue #1870392 by geerlingguy: Time delay overflows PHP_MAX_INT.

parent 804a8e4c
No related branches found
No related tags found
No related merge requests found
......@@ -260,7 +260,8 @@ function honeypot_get_time_limit($form_values = array()) {
':time' => time() - variable_get('honeypot_expire', 300),
))->fetchField();
}
$honeypot_time_limit = $honeypot_time_limit + (int) exp($number);
// Don't add more than 30 days' worth of extra time.
$honeypot_time_limit = $honeypot_time_limit + (int) min($honeypot_time_limit + exp($number), 2592000);
$additions = module_invoke_all('honeypot_time_limit', $honeypot_time_limit, $form_values, $number);
if (count($additions)) {
$honeypot_time_limit += array_sum($additions);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment