[SPIP] v3.2.12 -> v3.2.12 - Reinstallation avec le spip_loader
[lhc/web/www.git] / www / plugins-dist / medias / lib / getid3 / module.audio.monkey.php
old mode 100644 (file)
new mode 100755 (executable)
index 3317a93..beaca8c
@@ -14,6 +14,9 @@
 //                                                            ///
 /////////////////////////////////////////////////////////////////
 
+if (!defined('GETID3_INCLUDEPATH')) { // prevent path-exposing attacks that access modules directly on public webservers
+       exit;
+}
 
 class getid3_monkey extends getid3_handler
 {
@@ -162,7 +165,7 @@ class getid3_monkey extends getid3_handler
                                $info['md5_data_source'] = '';
                                $md5 = $thisfile_monkeysaudio_raw['cFileMD5'];
                                for ($i = 0; $i < strlen($md5); $i++) {
-                                       $info['md5_data_source'] .= str_pad(dechex(ord($md5{$i})), 2, '00', STR_PAD_LEFT);
+                                       $info['md5_data_source'] .= str_pad(dechex(ord($md5[$i])), 2, '00', STR_PAD_LEFT);
                                }
                                if (!preg_match('/^[0-9a-f]{32}$/', $info['md5_data_source'])) {
                                        unset($info['md5_data_source']);