Show
Ignore:
Timestamp:
04/23/11 04:42:27 (2 years ago)
Author:
tm1000
Message:

Updates to the web provisioner

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.9/endpointman/provisioning/.htaccess

    r12038 r12041  
    11RewriteEngine on 
    22RewriteRule ([^/]+\.cfg) provision_processing.php?request=$1 [L] 
     3RewriteRule ([^/]+\.tuz) provision_processing.php?request=$1 [L] 
    34RewriteRule ([^/]+\.xml) provision_processing.php?request=$1 [L] 
    45RewriteRule ([0-9a-f]{12}.*) provision_processing.php?request=$1 [L] 
  • modules/branches/2.9/endpointman/provisioning/provision_processing.php

    r12038 r12041  
    1919      echo "#left blank"; 
    2020      break; 
    21     case "aastra.cfg" 
     21    case "aastra.cfg"
    2222      echo "#left blank"; 
    2323      break; 
     24                case "security.tuz": 
     25                    if(file_exists("/var/www/html/admin/modules/_ep_phone_modules/endpoint/aastra/security.tuz")) { 
     26                        $handle = fopen("/var/www/html/admin/modules/_ep_phone_modules/endpoint/aastra/security.tuz", "rb"); 
     27                        $contents = stream_get_contents($handle); 
     28                        fclose($handle); 
     29                        echo $contents; 
     30                    }else { 
     31                        header("HTTP/1.0 404 Not Found"); 
     32                    } 
     33                    break; 
     34                case "aastra.tuz": 
     35                    if(file_exists("/var/www/html/admin/modules/_ep_phone_modules/endpoint/aastra/aastra.tuz")) { 
     36                        $handle = fopen("/var/www/html/admin/modules/_ep_phone_modules/endpoint/aastra/aastra.tuz", "rb"); 
     37                        $contents = stream_get_contents($handle); 
     38                        fclose($handle); 
     39                        echo $contents; 
     40                    } else { 
     41                        header("HTTP/1.0 404 Not Found"); 
     42                    } 
     43                    break; 
     44                default: 
     45                    header("HTTP/1.0 404 Not Found"); 
     46                    break; 
     47 
    2448  } 
    2549} else { 
     50         
    2651  $phone_info = $endpoint->get_phone_info($mac_id); 
    2752  $files = $endpoint->prepare_configs($phone_info,FALSE,FALSE); 
    28   echo $files[$_REQUEST['request']]; 
     53        if(key_exists($_REQUEST['request'], $files)) { 
     54            echo $files[$_REQUEST['request']]; 
     55        } else { 
     56           header("HTTP/1.0 404 Not Found"); 
     57        } 
    2958} 
    3059?>