PMCORE-4042 Reflected Cross-Site Scripting (XSS)

This commit is contained in:
Roly Gutierrez
2022-11-15 12:07:29 -04:00
parent a7cbcd64bf
commit 5a4c35d6c8

View File

@@ -62,16 +62,21 @@ if (is_file( $imagen )) {
//cpyMoreLogos($dir,$newDir);
$newDir .= PATH_SEP . $idDecode64;
$dir .= PATH_SEP . $idDecode64;
copy( $dir, $newDir );
showLogo( $newDir );
if (file_exists($dir)) {
copy($dir, $newDir);
showLogo( $newDir );
}
die();
}
function showLogo ($imagen)
{
$info = @getimagesize( $imagen );
$fp = fopen( $imagen, "rb" );
$fp = null;
if (file_exists($imagen)) {
$fp = fopen($imagen, "rb");
$info = @getimagesize($imagen);
}
if ($info && $fp) {
header( "Content-type: {$info['mime']}" );
fpassthru( $fp );