Unknow Quicktime Atom returning HIGH and LOW ascii

Think you found a bug in getID3()? Post here with details.
Post Reply
filmo
User
Posts: 22
Joined: Fri Dec 08, 2006 7:16 pm
Location: Los Angeles

Unknow Quicktime Atom returning HIGH and LOW ascii

Post by filmo » Wed Jan 29, 2014 11:35 pm

Line 1393 to 1399 of module.audio-video.quicktime.php is allowing high and/or low ASCII characters to be returned via $atomname.
SOAP services do not like encoding unexpected high or low characters and cause services to crap out. (SOAP likes UTF-8). I'm returning the results of getID3 via a SOAP service.

my quick and dirty fix is:
where I strip out both the high and low characters.

Code: Select all

default:
    $info['warning'][] = 'Unknown QuickTime atom type: "'.
        filter_var(filter_var($atomname,FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW),FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH).
        
        '" ('.trim(getid3_lib::PrintHexBytes($atomname)).') at offset '.$baseoffset;
    $atom_structure['data'] = $atom_data;
    break;
 

James Heinrich
getID3() v1 developer
Posts: 1421
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Re: Unknow Quicktime Atom returning HIGH and LOW ascii

Post by James Heinrich » Wed Feb 19, 2014 10:26 pm

Since filter_var is only available in PHP v5.2.0+ I have just used a simple regex to remove potentially unwanted characters on that line (and a few other places in modlue.audio-video.quicktime.php

Fixed in:
https://github.com/JamesHeinrich/getID3 ... 049a27314b

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests