Changeset 6234

Show
Ignore:
Timestamp:
07/31/08 12:02:28 (1 month ago)
Author:
p_lindheimer
Message:

fixes #2983 now we encrypt the path but not the sound file, for real security, make sure modules diretory is locked down

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.5/recordings/audio.php

    r6233 r6234  
    66 */ 
    77 
    8 if (isset($_GET['recording'])) { 
     8if (isset($_REQUEST['recording'])) { 
    99 
    1010  include_once("crypt.php"); 
     
    1414  $crypt = new Crypt(); 
    1515 
    16   $opath = $_GET['recording']; 
     16  $opath = $_REQUEST['recording']; 
    1717  $path = $crypt->decrypt($opath,$REC_CRYPT_PASSWORD); 
    1818 
  • modules/branches/2.5/recordings/crypt.php

    r4220 r6234  
    6363  function decrypt($enc, $salt, $iv_len = 16) { 
    6464 
    65      $enc = urldecode(base64_decode($enc)); 
     65     $enc = base64_decode(urldecode($enc)); 
    6666     $n = strlen($enc); 
    6767     $i = $iv_len; 
  • modules/branches/2.5/recordings/module.xml

    r6232 r6234  
    99        <description>Creates and manages system recordings, used by many other modules (eg, IVR).</description> 
    1010        <changelog> 
    11                 *3.3.8.2* #2547 remove access violation so modules dir can be locked down, fix bug in sound file path, add back encryption 
     11                *3.3.8.2* #2547, #2983 remove access violation so modules dir can be locked down, fix bug in sound file path, add back encryption 
    1212                *3.3.8.1* fixed typo in recordings_list 
    1313                *3.3.8* #2063, #2064, #2065, #2066, #2067, #2068, #2069 
  • modules/branches/2.5/recordings/page.recordings.php

    r6233 r6234  
    510510        $audio=$astpath; 
    511511 
    512         $recurl=$_SERVER['PHP_SELF']."?display=recordings&action=popup&recording=$audio"; 
     512        include_once("crypt.php"); 
     513  $crypt = new Crypt(); 
     514        $REC_CRYPT_PASSWORD = (isset($amp_conf['AMPPLAYKEY']) && trim($amp_conf['AMPPLAYKEY']) != "")?trim($amp_conf['AMPPLAYKEY']):'moufdsuu3nma0'; 
     515  $audio = $crypt->encrypt($audio,$REC_CRYPT_PASSWORD); 
     516        $recurl=$_SERVER['PHP_SELF']."?display=recordings&action=popup&recordingpath=$audio&recording="; 
    513517 
    514518        $html_txt .=  "<a href='#' ".(($count)?$hidden_state:'')." type='submit' id='play$count' onClick=\"javascript:popUp('$recurl',document.prompt.sysrec$count); return false;\" input='foo'>"; 
  • modules/branches/2.5/recordings/popup.php

    r6233 r6234  
    2525 
    2626        $REC_CRYPT_PASSWORD = (isset($amp_conf['AMPPLAYKEY']) && trim($amp_conf['AMPPLAYKEY']) != "")?trim($amp_conf['AMPPLAYKEY']):'moufdsuu3nma0'; 
    27   $file = $crypt->encrypt($_REQUEST['recording'],$REC_CRYPT_PASSWORD); 
    28   $ufile = basename($_REQUEST['recording']); 
     27 
     28  $path = $crypt->decrypt($_REQUEST['recordingpath'],$REC_CRYPT_PASSWORD); 
     29  $file = $crypt->encrypt($path.$_REQUEST['recording'],$REC_CRYPT_PASSWORD); 
     30  $ufile = $_REQUEST['recording']; 
    2931 
    3032  if (isset($file)) { 
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads