Salve!
Il team di sviluppatori e Nibbler hanno recentemente colmato una possibile falla di sicurezza; una nuova versione 1.4.17 è disponibile al seguente indirizzo:
http://downloads.sourceforge.net/coppermine/cpg1.4.17.zip E' possibile semplicemente modificare il fil
UPLOAD.PHP per prevenire eventuali attacchi, ad ogni modo un aggiornamento completo è caldamente consigliato a tutti.
Per il fix manuale, aprite il file UPLOAD.PHP e cercate la stringa seguente:
} else {
// We will try to get the extension from the database.
$MIME_result = cpg_db_query("SELECT extension FROM {$CONFIG['TABLE_FILETYPES']} WHERE mime='$URI_MIME_type'");
// Check to see if any results were returned.
if (!mysql_num_rows($MIME_result)) {
// No results, so free up the resources.
mysql_free_result($MIME_result);
// We cannot determine an extension from the MIME type provided, so note an error. Reject the file as unsafe.
$URI_failure_array[] = array( 'failure_ordinal'=>$failure_ordinal, 'URI_name'=> $_POST['URI_array'][$counter], 'error_code'=>$lang_upload_php['MIME_type_unknown']);
// There is no need for further tests or action, so skip the remainder of the iteration.
continue;
} else {
// The was a result. Fetch it.
$extension_data = mysql_fetch_array($MIME_result);
// Release the resources.
mysql_free_result($MIME_result);
// Store the extension in $extension.
$extension = $extension_data['extension'];
}
}
Rimpiazzatela con la seguente:
} else {
$extension = '';
foreach ($FILE_TYPES as $ext => $typedata){
if ($typedata['mime'] == $URI_MIME_type){
// Store the extension in $extension.
$extension = $ext;
break;
}
}
if (!$extension){
// We cannot determine an extension from the MIME type provided, so note an error. Reject the file as unsafe.
$URI_failure_array[] = array( 'failure_ordinal'=>$failure_ordinal, 'URI_name'=> $_POST['URI_array'][$counter], 'error_code'=>$lang_upload_php['MIME_type_unknown']);
// There is no need for further tests or action, so skip the remainder of the iteration.
continue;
}
}
E' sempre buona norma fare un backup prima di agire sul codice!
INFORMAZIONI COMPLEMENTARI :
- Se la vostra galleria ha subito un attacco, ricaricate la server tutti i files di Coppermine 1.4.17
- Verificate la cartella ALBUM e la sua arborescenza cercando files di archivio.ZIP e/o INDEX.PHP o INDEX.HTML che saranno da cancellare. Controllate particolarmente le sotto-cartelle USERPICS
- Rinnovate tutti gli eventuali plugins (ricaricatene i files)
- Se la galleria è integrata ad un forum o ad un altro CMS in PHP, effettuate lo stesso procedimento a tutti i files
- Pensate anche a verificare i files HTML se avete un sito collegato in questo linguaggio
TUTTI I FILES DEL VOSTRO SITO, SE AVETE SUBITO UN ATTACCO, SONO POTENZIALMENTE CONTAMINATI