mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
run wrong values in error message through htmlspecialchars()
This commit is contained in:
parent
6648c7c404
commit
ff0f2dcbbe
@ -21,7 +21,7 @@ foreach(array('width'=>1,'height'=>1,'color1'=>'000080','color2'=>'ffffff') as $
|
||||
foreach(array('color1','color2') as $name)
|
||||
{
|
||||
preg_match('/^#?([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})$/',$$name,$rgb) or
|
||||
die("Wrong value '".$$name."' for $name, should be something like #80FFFF' !!!");
|
||||
die("Wrong value '".htmlspecialchars($$name)."' for $name, should be something like #80FFFF' !!!");
|
||||
|
||||
$$name = array('r'=>hexdec($rgb[1]),'g'=>hexdec($rgb[2]),'b'=>hexdec($rgb[3]));
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ imagecolortransparent($image, $white);
|
||||
foreach(array('color','bgcolor') as $name)
|
||||
{
|
||||
preg_match('/^#?([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})$/',$$name,$rgb) or
|
||||
die("Wrong value '".$$name."' for $name, should be something like #80FFFF' !!!");
|
||||
die("Wrong value '".htmlspecialchars($$name)."' for $name, should be something like #80FFFF' !!!");
|
||||
|
||||
$$name = imagecolorallocate($image,hexdec($rgb[1]),hexdec($rgb[2]),hexdec($rgb[3]));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user