summaryrefslogtreecommitdiffstats
path: root/usr/local/www/pkg_mgr_install.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-12-14 15:59:39 -0500
committerScott Ullrich <sullrich@pfsense.org>2010-12-14 15:59:39 -0500
commit70ed5a6af5e2bdbfcb1f35e2fba9b748043f1260 (patch)
treecfb371eef7b30997e8eb3ba2b677a743aa0f0416 /usr/local/www/pkg_mgr_install.php
parentd98d2db3ca27299ccf73535c7edcef8281974f23 (diff)
downloadpfsense-70ed5a6af5e2bdbfcb1f35e2fba9b748043f1260.zip
pfsense-70ed5a6af5e2bdbfcb1f35e2fba9b748043f1260.tar.gz
Use file_put_contents()
Diffstat (limited to 'usr/local/www/pkg_mgr_install.php')
-rwxr-xr-xusr/local/www/pkg_mgr_install.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/usr/local/www/pkg_mgr_install.php b/usr/local/www/pkg_mgr_install.php
index e4e25e7..0295172 100755
--- a/usr/local/www/pkg_mgr_install.php
+++ b/usr/local/www/pkg_mgr_install.php
@@ -153,7 +153,7 @@ switch($_GET['mode']) {
update_output_window($static_output);
filter_configure();
}
- file_put_contents("/tmp/" . $_GET['pkg'] . ".info", $static_output);
+ file_put_contents("/tmp/" . escapeshellcmd($_GET['pkg']) . ".info", $static_output);
echo "<script type='text/javascript'>document.location=\"pkg_mgr_install.php?mode=installedinfo&pkg={$_GET['pkg']}\";</script>";
break;
case "installedinfo":
@@ -193,8 +193,6 @@ switch($_GET['mode']) {
$static_output .= "\n" . gettext("Installation halted.");
update_output_window($static_output);
} else {
- $filename = escapeshellcmd("/tmp/" . $_GET['id'] . ".info");
- $fd = fopen($filename, "w");
$status_a = gettext("Installation of") . " " . htmlspecialchars($_GET['id']) . " " . gettext("completed.");
update_status($status_a);
$status = get_after_install_info($_GET['id']);
@@ -202,9 +200,8 @@ switch($_GET['mode']) {
$static_output .= "\n" . gettext("Installation completed.") . "\n{$_GET['id']} " . gettext("setup instructions") . ":\n{$status}";
else
$static_output .= "\n" . gettext("Installation completed. Please check to make sure that the package is configured from the respective menu then start the package.");
- fwrite($fd, $status_a . "\n". $static_output);
- fclose($fd);
- echo "<script type='text/javascript'>document.location=\"pkg_mgr_install.php?mode=installedinfo&pkg={$_GET['id']}\";</script>";
+ file_put_contents("/tmp/" . escapeshellcmd($_GET['id']) . ".info", $static_output);
+ echo "<script type='text/javascript'>document.location=\"pkg_mgr_install.php?mode=installedinfo&pkg={$_GET['id']}\";</script>";
}
filter_configure();
break;
OpenPOWER on IntegriCloud