Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Aggiornamento di sicurezza CPG 1.4.17  (Read 5707 times)

0 Members and 1 Guest are viewing this topic.

Davide Renda

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1427
  • aka "Lontano"
    • www.daviderenda.eu
Aggiornamento di sicurezza CPG 1.4.17
« on: April 13, 2008, 09:38:57 pm »

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:

Code: [Select]
} 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:
Code: [Select]
                } 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
« Last Edit: April 13, 2008, 09:44:14 pm by Lontano »
Logged

Davide Renda

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1427
  • aka "Lontano"
    • www.daviderenda.eu
Re: [cpg1.4.x]: Aggiornamento di sicurezza CPG 1.4.17
« Reply #1 on: April 13, 2008, 09:43:46 pm »

Gli utenti del Modpack di Stramm troveranno la versione aggiornata al seguente link:
ModPack 1.4.17 par Stramm.
http://stramm.st.funpic.org/albums/userpics/10001/stramm_mod1_4_17_bridge.zip

La procedura da seguire sarà quindi:
1) scaricare la versione 1.4.17 di Coppermine e copiarla sul vostro server, sovrascrivendo i files esistenti (seguire le istruzioni di aggiornamento dalla documentazione)
2) lanciare UPDATE.PHP dal vostro navigatore internet
3) scaricare la versione 1.4.17 del Modpack di Stramm e copiarla sul vostro server, sovrascrivendo i files esistenti (seguire le istruzioni di aggiornamento dalla documentazione)
4) rilanciare UPDATE.PHP dal vostro navigatore internet

by Twist: Fixato il link
« Last Edit: April 13, 2008, 10:25:52 pm by twist »
Logged

twist

  • Moderator
  • Coppermine frequent poster
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 360
    • 100iso.eu
Re: Aggiornamento di sicurezza CPG 1.4.17
« Reply #2 on: April 13, 2008, 10:03:43 pm »

Grazie, non mi ero proprio accorto dell'uscita di questa nuova versione :/
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.