X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=www%2Fplugins-dist%2Fmedias%2Flib%2Fgetid3%2Fmodule.misc.iso.php;h=efca73aa13b115810e2d431ac8d35cf2344982a0;hb=fd181064435bb60f1664ba4d8836fefce6ab0e0a;hp=231a32a23747fe67db378013e0d2599ea322757b;hpb=ca80d6d980f19d00653a96f5c25f524b3d7334ed;p=lhc%2Fweb%2Fwww.git diff --git a/www/plugins-dist/medias/lib/getid3/module.misc.iso.php b/www/plugins-dist/medias/lib/getid3/module.misc.iso.php index 231a32a2..efca73aa 100644 --- a/www/plugins-dist/medias/lib/getid3/module.misc.iso.php +++ b/www/plugins-dist/medias/lib/getid3/module.misc.iso.php @@ -14,6 +14,9 @@ // /// ///////////////////////////////////////////////////////////////// +if (!defined('GETID3_INCLUDEPATH')) { // prevent path-exposing attacks that access modules directly on public webservers + exit; +} class getid3_iso extends getid3_handler { @@ -29,7 +32,7 @@ class getid3_iso extends getid3_handler $this->fseek(2048 * $i); $ISOheader = $this->fread(2048); if (substr($ISOheader, 1, 5) == 'CD001') { - switch (ord($ISOheader{0})) { + switch (ord($ISOheader[0])) { case 1: $info['iso']['primary_volume_descriptor']['offset'] = 2048 * $i; $this->ParsePrimaryVolumeDescriptor($ISOheader); @@ -296,9 +299,9 @@ class getid3_iso extends getid3_handler $DirectoryRecordData = $this->fread(1); $DirectoryRecord = array(); - while (ord($DirectoryRecordData{0}) > 33) { + while (ord($DirectoryRecordData[0]) > 33) { - $DirectoryRecordData .= $this->fread(ord($DirectoryRecordData{0}) - 1); + $DirectoryRecordData .= $this->fread(ord($DirectoryRecordData[0]) - 1); $ThisDirectoryRecord = array(); @@ -389,13 +392,13 @@ class getid3_iso extends getid3_handler // 6: second of the minute from 0 to 59 // 7: Offset from Greenwich Mean Time in number of 15 minute intervals from -48 (West) to +52 (East) - $UNIXyear = ord($ISOtime{0}) + 1900; - $UNIXmonth = ord($ISOtime{1}); - $UNIXday = ord($ISOtime{2}); - $UNIXhour = ord($ISOtime{3}); - $UNIXminute = ord($ISOtime{4}); - $UNIXsecond = ord($ISOtime{5}); - $GMToffset = $this->TwosCompliment2Decimal(ord($ISOtime{5})); + $UNIXyear = ord($ISOtime[0]) + 1900; + $UNIXmonth = ord($ISOtime[1]); + $UNIXday = ord($ISOtime[2]); + $UNIXhour = ord($ISOtime[3]); + $UNIXminute = ord($ISOtime[4]); + $UNIXsecond = ord($ISOtime[5]); + $GMToffset = $this->TwosCompliment2Decimal(ord($ISOtime[5])); return gmmktime($UNIXhour, $UNIXminute, $UNIXsecond, $UNIXmonth, $UNIXday, $UNIXyear); }