Make it more unique

If you have 2 forms on one page time will be not unique
This commit is contained in:
Max Kovpak 2015-08-25 16:57:49 +03:00
parent 84760b0a9f
commit 50405a74a1

View File

@ -77,7 +77,7 @@ class CaptchaGenerator
// Returns the image generation URL
if ($options['as_url']) {
return $this->router->generate('gregwar_captcha.generate_captcha',
array('key' => $options['session_key'], 'n' => time()));
array('key' => $options['session_key'], 'n' => md5(microtime(true).rand(0, 9))));
}
return 'data:image/jpeg;base64,' . base64_encode($this->generate($options));