mirror of
https://github.com/e107inc/e107.git
synced 2025-08-21 05:41:58 +02:00
Issue #439 CAPTCHA was difficult to read on some backgrounds. Added support for constant e_CAPTCHA_FONTCOLOR (use hex color) which may be used in theme.php
This commit is contained in:
@@ -40,7 +40,18 @@ require_once(realpath(e_BASE.$HANDLERS_DIRECTORY.DIRECTORY_SEPARATOR."secure_img
|
||||
|
||||
$sim = new secure_image();
|
||||
|
||||
$sim->render($_SERVER['QUERY_STRING']);
|
||||
$code = $_GET['id'];
|
||||
|
||||
if(preg_match('/^[a-f0-9]{6}$/i', $_GET['clr'])) //hex color is valid
|
||||
{
|
||||
$color = $_GET['clr'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$color = "cccccc";
|
||||
}
|
||||
|
||||
$sim->render($code,$color);
|
||||
|
||||
exit;
|
||||
|
||||
|
Reference in New Issue
Block a user