Changeset 5996

Show
Ignore:
Timestamp:
07/13/08 18:21:12 (6 months ago)
Author:
p_lindheimer
Message:

#2773 change exec to unlink() so command injection does not work

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.4/music/module.xml

    r5804 r5996  
    22        <rawname>music</rawname> 
    33        <name>Music on Hold</name> 
    4         <version>2.4.0.2</version> 
     4        <version>2.4.0.3</version> 
    55        <candisable>no</candisable> 
    66        <canuninstall>no</canuninstall> 
     
    99        <description>Uploading and management of sound files (wav, mp3) to be used for on-hold music.</description> 
    1010        <changelog> 
     11                *2.4.0.3* #2773 change change from exec of rm to unlink to remove security vulnerability 
    1112                *2.4.0.2* #2843 Russian Translation 
    1213                *2.4.0.1* #2591 localization fixes 
  • modules/branches/2.4/music/page.music.php

    r5658 r5996  
    333333                        echo "<h5>"._("You must have at least one file for On Hold Music.  Please upload one before deleting this one.")."</h5>"; 
    334334                } else { 
    335                         $rmcmd="rm -f \"".$path_to_dir."/".$del."\""; 
    336                         exec($rmcmd); 
    337                         echo "<h5>"._("Deleted")." ".$del."!</h5>"; 
     335                        if (@unlink($path_to_dir."/".$del)) { 
     336                                echo "<h5>"._("Deleted")." ".$del."!</h5>"; 
     337                        } else { 
     338                                echo "<h5>".sprintf(_("Error Deleting %s"),$del)."!</h5>"; 
     339                        } 
    338340                        //kill_mpg123(); 
    339341                        needreload();