Etiket arşivi: Lib Swf

OpenX flash player version detect bug

Find the following function in www/admin/lib-swf.inc.php (relative to your OpenX base install directory):

<?php 
function phpAds_SWFVersion($buffer) 
{ 
    if (substr($buffer, 0, 3) == swf_tag_identify || 
        substr($buffer, 0, 3) == swf_tag_compressed) 
        return ord(substr($buffer, 3, 1)); 
    else 
        return false; 
} 
?>

And change that to:

<?php 
function phpAds_SWFVersion($buffer) 
{ 
    if (substr($buffer, 0, 3) == swf_tag_identify || 
        substr($buffer, 0, 3) == swf_tag_compressed) 
    { 
        $rv = ord(substr($buffer, 3, 1)); 
        if ($rv > 10 && $rv < 13) $rv = 10; 
        elseif ($rv >= 13) $rv = 11; 
        return $rv; 
    } else 
        return false; 
} 
?>