Merged in bugfix/PMCORE-4042 (pull request #8634)
PMCORE-4042 Reflected Cross-Site Scripting (XSS) Approved-by: Julio Cesar Laura Avendaño
This commit is contained in:
@@ -62,16 +62,21 @@ if (is_file( $imagen )) {
|
|||||||
//cpyMoreLogos($dir,$newDir);
|
//cpyMoreLogos($dir,$newDir);
|
||||||
$newDir .= PATH_SEP . $idDecode64;
|
$newDir .= PATH_SEP . $idDecode64;
|
||||||
$dir .= PATH_SEP . $idDecode64;
|
$dir .= PATH_SEP . $idDecode64;
|
||||||
copy( $dir, $newDir );
|
if (file_exists($dir)) {
|
||||||
showLogo( $newDir );
|
copy($dir, $newDir);
|
||||||
|
showLogo( $newDir );
|
||||||
|
}
|
||||||
die();
|
die();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function showLogo ($imagen)
|
function showLogo ($imagen)
|
||||||
{
|
{
|
||||||
$info = @getimagesize( $imagen );
|
$fp = null;
|
||||||
$fp = fopen( $imagen, "rb" );
|
if (file_exists($imagen)) {
|
||||||
|
$fp = fopen($imagen, "rb");
|
||||||
|
$info = @getimagesize($imagen);
|
||||||
|
}
|
||||||
if ($info && $fp) {
|
if ($info && $fp) {
|
||||||
header( "Content-type: {$info['mime']}" );
|
header( "Content-type: {$info['mime']}" );
|
||||||
fpassthru( $fp );
|
fpassthru( $fp );
|
||||||
|
|||||||
Reference in New Issue
Block a user