Changeset 6232

Show
Ignore:
Timestamp:
07/31/08 10:04:22 (2 months ago)
Author:
p_lindheimer
Message:

fixes #2547 run popup.php and audio.php through an action and include in page.recordings.php so modules dir can be locked down, fix bug in sound file path, add back encryption (which introduces a bug that was fixed in ARI and needs to be investigated)

Files:

Legend:

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

    r5078 r6232  
    1616  $opath = $_GET['recording']; 
    1717  $path = $crypt->decrypt($opath,urldecode($REC_CRYPT_PASSWORD)); 
    18   $path=$opath; 
    1918 
    2019  // strip ".." from path for security 
  • modules/branches/2.5/recordings/module.xml

    r6161 r6232  
    22        <rawname>recordings</rawname> 
    33        <name>Recordings</name> 
    4         <version>3.3.8.1</version> 
     4        <version>3.3.8.2</version> 
    55        <candisable>no</candisable> 
    66        <canuninstall>no</canuninstall> 
     
    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 
    1112                *3.3.8.1* fixed typo in recordings_list 
    1213                *3.3.8* #2063, #2064, #2065, #2066, #2067, #2068, #2069 
  • modules/branches/2.5/recordings/page.recordings.php

    r6196 r6232  
    1616 
    1717$action = isset($_REQUEST['action'])?$_REQUEST['action']:''; 
     18 
     19// Lite weight popup code here, don't need everything else below 
     20// 
     21switch ($action) { 
     22        case 'popup': 
     23        case 'audio': 
     24        include_once("$action.php"); 
     25                exit; 
     26                break; 
     27        default: 
     28                break; 
     29} 
    1830$id = isset($_REQUEST['id'])?$_REQUEST['id']:''; 
    1931$notes = isset($_REQUEST['notes'])?$_REQUEST['notes']:''; 
     
    235247        global $fcode; 
    236248        global $fcode_pass; 
     249        global $recordings_astsnd_path; 
    237250?> 
    238251        <div class="content"> 
     
    498511 
    499512        $REC_CRYPT_PASSWORD = urlencode((isset($amp_conf['AMPPLAYKEY']) && trim($amp_conf['AMPPLAYKEY']) != "")?trim($amp_conf['AMPPLAYKEY']):'moufdsuu3nma0'); 
    500         $recurl="modules/recordings/popup.php?cryptpass=$REC_CRYPT_PASSWORD&recording=$audio"; 
     513        $recurl=$_SERVER['PHP_SELF']."?display=recordings&action=popup&cryptpass=$REC_CRYPT_PASSWORD&recording=$audio"; 
    501514 
    502515        $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

    r5109 r6232  
    1414        <head> 
    1515                <TITLE>FreePBX Recording Review</TITLE> 
    16                 <link rel="stylesheet" href="popup.css" type="text/css"> 
     16                <link rel="stylesheet" href="modules/recordings/popup.css" type="text/css"> 
    1717                <meta http-equiv="content-type" content="text/html; charset=UTF-8"> 
    1818        </head> 
     
    2121<?php 
    2222 
    23   $REC_CRYPT_PASSWORD = urlencode((isset($_REQUEST['cryptpass']) && trim($_REQUEST['cryptpass']) != "")?trim($_REQUEST['cryptpass']):'moufdsuu3nma0'); 
    2423 
    2524  $crypt = new Crypt(); 
    2625 
     26  $REC_CRYPT_PASSWORD = (isset($_REQUEST['cryptpass']) && trim($_REQUEST['cryptpass']) != "")?trim($_REQUEST['cryptpass']):'moufdsuu3nma0'; 
    2727  $file = $crypt->encrypt($_REQUEST['recording'],$REC_CRYPT_PASSWORD); 
    28   $ufile = $_REQUEST['recording']
    29   $file = $_REQUEST['recording']
     28  $ufile = basename($_REQUEST['recording'])
     29  $REC_CRYPT_PASSWORD = urlencode($REC_CRYPT_PASSWORD)
    3030 
    3131  if (isset($file)) { 
    3232    echo("<br>"); 
    33     echo("<embed src='audio.php?cryptpass=$REC_CRYPT_PASSWORD&recording=$file' width=300, height=20 autoplay=true loop=false></embed><br>"); 
    34     echo("<br><h1 class='popup_download'>playing: $file</h1><br>"); 
     33    echo("<embed src='".$_SERVER['PHP_SELF']."?display=recordings&action=audio&cryptpass=$REC_CRYPT_PASSWORD&recording=$file' width=300, height=20 autoplay=true loop=false></embed><br>"); 
     34    echo("<br><h1 class='popup_download'>playing: $ufile</h1><br>"); 
    3535  } 
    3636?> 
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads