Changeset 2767
- Timestamp:
- 10/18/06 21:10:22 (7 years ago)
- Files:
-
- modules/branches/2.2/asterisk-cli/page.cli.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.2/asterisk-cli/page.cli.php
r1350 r2767 66 66 putenv("PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"); 67 67 putenv("SCRIPT_FILENAME=" . strtok(stripslashes($txtCommand), " ")); /* PHP scripts */ 68 $ph = popen(stripslashes("asterisk -rx \"$txtCommand\""), "r" ); 68 $badchars = array("'", "`", "\\", ";", "\""); // Strip off any nasty chars. 69 $fixedcmd = str_replace($badchars, "", $txtCommand); 70 $ph = popen(stripslashes("asterisk -rx \"$fixedcmd\""), "r" ); 69 71 while ($line = fgets($ph)) 70 72 echo htmlspecialchars($line);
