Compatible SPIP 4.1
Mise à jour de la lib en 1.9.21 (et remise dedans de la fonction getid3_lib::ImageTypesLookup supprimée suite à https://github.com/JamesHeinrich/getID3/pull/156, signalé https://github.com/JamesHeinrich/getID3/issues/391) En test car seuls les MP3 ont été testés (avec ou sans couverture)master
parent
53de7fe78a
commit
923db966dd
@ -1,118 +0,0 @@
|
||||
* text=auto !eol
|
||||
action/getid3_appliquer_cover_defaut.php -text
|
||||
action/getid3_infos.php -text
|
||||
action/getid3_verifier_binaires.php -text
|
||||
base/getid3_base.php -text
|
||||
demo/test_id3.html -text
|
||||
demo/test_id3_fonctions.php -text
|
||||
formulaires/configurer_getid3.html -text
|
||||
formulaires/editer_id3.html -text
|
||||
formulaires/editer_id3.php -text
|
||||
genie/getid3_taches_generales.php -text
|
||||
getid3/extension.cache.dbm.php -text
|
||||
getid3/extension.cache.mysql.php -text
|
||||
getid3/extension.cache.mysqli.php -text
|
||||
getid3/extension.cache.sqlite3.php -text
|
||||
getid3/getid3.lib.php -text
|
||||
getid3/getid3.php -text
|
||||
getid3/module.archive.gzip.php -text
|
||||
getid3/module.archive.rar.php -text
|
||||
getid3/module.archive.szip.php -text
|
||||
getid3/module.archive.tar.php -text
|
||||
getid3/module.archive.zip.php -text
|
||||
getid3/module.audio-video.asf.php -text
|
||||
getid3/module.audio-video.bink.php -text
|
||||
getid3/module.audio-video.flv.php -text
|
||||
getid3/module.audio-video.matroska.php -text
|
||||
getid3/module.audio-video.mpeg.php -text
|
||||
getid3/module.audio-video.nsv.php -text
|
||||
getid3/module.audio-video.quicktime.php -text
|
||||
getid3/module.audio-video.real.php -text
|
||||
getid3/module.audio-video.riff.php -text
|
||||
getid3/module.audio-video.swf.php -text
|
||||
getid3/module.audio-video.ts.php -text
|
||||
getid3/module.audio.aa.php -text
|
||||
getid3/module.audio.aac.php -text
|
||||
getid3/module.audio.ac3.php -text
|
||||
getid3/module.audio.amr.php -text
|
||||
getid3/module.audio.au.php -text
|
||||
getid3/module.audio.avr.php -text
|
||||
getid3/module.audio.bonk.php -text
|
||||
getid3/module.audio.dsf.php -text
|
||||
getid3/module.audio.dss.php -text
|
||||
getid3/module.audio.dts.php -text
|
||||
getid3/module.audio.flac.php -text
|
||||
getid3/module.audio.la.php -text
|
||||
getid3/module.audio.lpac.php -text
|
||||
getid3/module.audio.midi.php -text
|
||||
getid3/module.audio.mod.php -text
|
||||
getid3/module.audio.monkey.php -text
|
||||
getid3/module.audio.mp3.php -text
|
||||
getid3/module.audio.mpc.php -text
|
||||
getid3/module.audio.ogg.php -text
|
||||
getid3/module.audio.optimfrog.php -text
|
||||
getid3/module.audio.rkau.php -text
|
||||
getid3/module.audio.shorten.php -text
|
||||
getid3/module.audio.tta.php -text
|
||||
getid3/module.audio.voc.php -text
|
||||
getid3/module.audio.vqf.php -text
|
||||
getid3/module.audio.wavpack.php -text
|
||||
getid3/module.graphic.bmp.php -text
|
||||
getid3/module.graphic.efax.php -text
|
||||
getid3/module.graphic.gif.php -text
|
||||
getid3/module.graphic.jpg.php -text
|
||||
getid3/module.graphic.pcd.php -text
|
||||
getid3/module.graphic.png.php -text
|
||||
getid3/module.graphic.svg.php -text
|
||||
getid3/module.graphic.tiff.php -text
|
||||
getid3/module.misc.cue.php -text
|
||||
getid3/module.misc.exe.php -text
|
||||
getid3/module.misc.iso.php -text
|
||||
getid3/module.misc.msoffice.php -text
|
||||
getid3/module.misc.par2.php -text
|
||||
getid3/module.misc.pdf.php -text
|
||||
getid3/module.tag.apetag.php -text
|
||||
getid3/module.tag.id3v1.php -text
|
||||
getid3/module.tag.id3v2.php -text
|
||||
getid3/module.tag.lyrics3.php -text
|
||||
getid3/module.tag.xmp.php -text
|
||||
getid3/write.apetag.php -text
|
||||
getid3/write.id3v1.php -text
|
||||
getid3/write.id3v2.php -text
|
||||
getid3/write.lyrics3.php -text
|
||||
getid3/write.metaflac.php -text
|
||||
getid3/write.php -text
|
||||
getid3/write.real.php -text
|
||||
getid3/write.vorbiscomment.php -text
|
||||
/getid3_administrations.php -text
|
||||
/getid3_fonctions.php -text
|
||||
/getid3_pipelines.php -text
|
||||
images/id3v2-24.png -text
|
||||
images/id3v2.png -text
|
||||
inc/getid3_ecrire_infos.php -text
|
||||
inc/getid3_recuperer_infos.php -text
|
||||
inc/getid3_verifier_binaires.php -text
|
||||
inc/recuperer_id3.php -text
|
||||
lang/getid3.xml -text
|
||||
lang/getid3_en.php -text
|
||||
lang/getid3_es.php -text
|
||||
lang/getid3_fr.php -text
|
||||
lang/getid3_sk.php -text
|
||||
lang/paquet-getid3.xml -text
|
||||
lang/paquet-getid3_en.php -text
|
||||
lang/paquet-getid3_es.php -text
|
||||
lang/paquet-getid3_fr.php -text
|
||||
lang/paquet-getid3_sk.php -text
|
||||
metadata/audio.php -text
|
||||
metadata/flv.php -text
|
||||
metadata/video.php -text
|
||||
notifications/getid3_verifier_binaires.html -text
|
||||
notifications/getid3_verifier_binaires.php -text
|
||||
/paquet.xml -text
|
||||
prive/squelettes/contenu/configurer_getid3.html -text
|
||||
prive/squelettes/contenu/document_id3_editer.html -text
|
||||
prive/squelettes/inclure/metadatas_document_desc_action.html -text
|
||||
prive/squelettes/inclure/prive_infos_media.html -text
|
||||
prive/squelettes/navigation/document_id3_editer.html -text
|
||||
prive/style_prive_plugin_getid3.html -text
|
||||
prive/themes/spip/images/id3v2-24.png -text
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,92 @@
|
||||
<?php
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
/// getID3() by James Heinrich <info@getid3.org> //
|
||||
// available at https://github.com/JamesHeinrich/getID3 //
|
||||
// or https://www.getid3.org //
|
||||
// or http://getid3.sourceforge.net //
|
||||
// see readme.txt for more details //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// module.archive.hpk.php //
|
||||
// module for analyzing HPK files //
|
||||
// dependencies: NONE //
|
||||
// ///
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
if (!defined('GETID3_INCLUDEPATH')) { // prevent path-exposing attacks that access modules directly on public webservers
|
||||
exit;
|
||||
}
|
||||
|
||||
class getid3_hpk extends getid3_handler
|
||||
{
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function Analyze() {
|
||||
$info = &$this->getid3->info;
|
||||
|
||||
$info['fileformat'] = 'hpk';
|
||||
|
||||
$this->fseek($info['avdataoffset']);
|
||||
$HPKheader = $this->fread(36);
|
||||
|
||||
if (substr($HPKheader, 0, 4) == 'BPUL') {
|
||||
|
||||
$info['hpk']['header']['signature'] = substr($HPKheader, 0, 4);
|
||||
$info['hpk']['header']['data_offset'] = getid3_lib::LittleEndian2Int(substr($HPKheader, 4, 4));
|
||||
$info['hpk']['header']['fragments_per_file'] = getid3_lib::LittleEndian2Int(substr($HPKheader, 8, 4));
|
||||
//$info['hpk']['header']['unknown1'] = getid3_lib::LittleEndian2Int(substr($HPKheader, 12, 4));
|
||||
$info['hpk']['header']['fragments_residual_offset'] = getid3_lib::LittleEndian2Int(substr($HPKheader, 16, 4));
|
||||
$info['hpk']['header']['fragments_residual_count'] = getid3_lib::LittleEndian2Int(substr($HPKheader, 20, 4));
|
||||
//$info['hpk']['header']['unknown2'] = getid3_lib::LittleEndian2Int(substr($HPKheader, 24, 4));
|
||||
$info['hpk']['header']['fragmented_filesystem_offset'] = getid3_lib::LittleEndian2Int(substr($HPKheader, 28, 4));
|
||||
$info['hpk']['header']['fragmented_filesystem_length'] = getid3_lib::LittleEndian2Int(substr($HPKheader, 32, 4));
|
||||
|
||||
$info['hpk']['header']['filesystem_entries'] = $info['hpk']['header']['fragmented_filesystem_length'] / ($info['hpk']['header']['fragments_per_file'] * 8);
|
||||
$this->fseek($info['hpk']['header']['fragmented_filesystem_offset']);
|
||||
for ($i = 0; $i < $info['hpk']['header']['filesystem_entries']; $i++) {
|
||||
$offset = getid3_lib::LittleEndian2Int($this->fread(4));
|
||||
$length = getid3_lib::LittleEndian2Int($this->fread(4));
|
||||
$info['hpk']['filesystem'][$i] = array('offset' => $offset, 'length' => $length);
|
||||
}
|
||||
|
||||
$this->error('HPK parsing incomplete (and mostly broken) in this version of getID3() ['.$this->getid3->version().']');
|
||||
|
||||
/*
|
||||
$filename = '';
|
||||
$dirs = array();
|
||||
foreach ($info['hpk']['filesystem'] as $key => $filesystemdata) {
|
||||
$this->fseek($filesystemdata['offset']);
|
||||
$first4 = $this->fread(4);
|
||||
if (($first4 == 'LZ4 ') || ($first4 == 'ZLIB')) {
|
||||
// actual data, ignore
|
||||
$info['hpk']['toc'][$key] = array(
|
||||
'filename' => ltrim(implode('/', $dirs).'/'.$filename, '/'),
|
||||
'offset' => $filesystemdata['offset'],
|
||||
'length' => $filesystemdata['length'],
|
||||
);
|
||||
$filename = '';
|
||||
$dirs = array();
|
||||
} else {
|
||||
$fragment_index = getid3_lib::LittleEndian2Int($first4);
|
||||
$fragment_type = getid3_lib::LittleEndian2Int($this->fread(4)); // file = 0, directory = 1
|
||||
$name_length = getid3_lib::LittleEndian2Int($this->fread(2));
|
||||
if ($fragment_type == 1) {
|
||||
$dirs[] = $this->fread($name_length);
|
||||
} else {
|
||||
$filename = $this->fread($name_length);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
} else {
|
||||
$this->error('Expecting "BPUL" at offset '.$info['avdataoffset'].', found "'.getid3_lib::PrintHexBytes(substr($HPKheader, 0, 4)).'"');
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
/// getID3() by James Heinrich <info@getid3.org> //
|
||||
// available at https://github.com/JamesHeinrich/getID3 //
|
||||
// or https://www.getid3.org //
|
||||
// or http://getid3.sourceforge.net //
|
||||
// see readme.txt for more details //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// module.archive.xz.php //
|
||||
// module for analyzing XZ files //
|
||||
// dependencies: NONE //
|
||||
// ///
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
if (!defined('GETID3_INCLUDEPATH')) { // prevent path-exposing attacks that access modules directly on public webservers
|
||||
exit;
|
||||
}
|
||||
|
||||
class getid3_xz extends getid3_handler
|
||||
{
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function Analyze() {
|
||||
$info = &$this->getid3->info;
|
||||
|
||||
$this->fseek($info['avdataoffset']);
|
||||
$xzheader = $this->fread(6);
|
||||
|
||||
// https://tukaani.org/xz/xz-file-format-1.0.4.txt
|
||||
$info['xz']['stream_header']['magic'] = substr($xzheader, 0, 6);
|
||||
if ($info['xz']['stream_header']['magic'] != "\xFD".'7zXZ'."\x00") {
|
||||
$this->error('Invalid XZ stream header magic (expecting FD 37 7A 58 5A 00, found '.getid3_lib::PrintHexBytes($info['xz']['stream_header']['magic']).') at offset '.$info['avdataoffset']);
|
||||
return false;
|
||||
}
|
||||
$info['fileformat'] = 'xz';
|
||||
$this->error('XZ parsing not enabled in this version of getID3() ['.$this->getid3->version().']');
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
}
|