From fe6eed2934128ec6057daa247538a3f13b5e7a99 Mon Sep 17 00:00:00 2001 From: mattpass Date: Mon, 3 Feb 2020 11:07:05 +0000 Subject: [PATCH] Don't prefix ../data before contents --- lib/ftp-manager.php | 2 +- lib/github-manager.php | 4 ++-- lib/go-localhost-root.php | 2 +- lib/plugins-manager.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/ftp-manager.php b/lib/ftp-manager.php index 28daa2a..13a2a45 100644 --- a/lib/ftp-manager.php +++ b/lib/ftp-manager.php @@ -105,7 +105,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset // Now update the config file if (is_writeable("../data/".$settingsFile)) { $fh = fopen("../data/".$settingsFile, 'w'); - fwrite($fh, "../data/".$settingsContents); + fwrite($fh, $settingsContents); fclose($fh); // Finally, reload the iFrame screen for the user header("Location: ftp-manager.php?updatedFTPSites&csrf=".$_SESSION["csrf"]); diff --git a/lib/github-manager.php b/lib/github-manager.php index a75f283..d553300 100644 --- a/lib/github-manager.php +++ b/lib/github-manager.php @@ -50,7 +50,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset // Now update the config file if (is_writeable("../data/".$settingsFile)) { $fh = fopen("../data/".$settingsFile, 'w'); - fwrite($fh, "../data/".$settingsContents); + fwrite($fh, $settingsContents); fclose($fh); // Clear any FTP session we may have @@ -153,7 +153,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset // Now update the config file if (is_writeable("../data/".$settingsFile)) { $fh = fopen("../data/".$settingsFile, 'w'); - fwrite($fh, "../data/".$settingsContents); + fwrite($fh, $settingsContents); fclose($fh); // Finally, reload the iFrame screen for the user header("Location: github-manager.php?updatedGithubPaths&csrf=".$_SESSION["csrf"]); diff --git a/lib/go-localhost-root.php b/lib/go-localhost-root.php index a389a1b..70ea595 100644 --- a/lib/go-localhost-root.php +++ b/lib/go-localhost-root.php @@ -20,7 +20,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn']) { // Now update the config file if (is_writeable("../data/".$settingsFile)) { $fh = fopen("../data/".$settingsFile, 'w'); - fwrite($fh, "../data/".$settingsContents); + fwrite($fh, $settingsContents); fclose($fh); // Clear any FTP session we may have diff --git a/lib/plugins-manager.php b/lib/plugins-manager.php index e26fa88..1301960 100644 --- a/lib/plugins-manager.php +++ b/lib/plugins-manager.php @@ -134,7 +134,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset // Now update the config file if (is_writeable("../data/".$settingsFile)) { $fh = fopen("../data/".$settingsFile, 'w'); - fwrite($fh, "../data/".$settingsContents); + fwrite($fh, $settingsContents); fclose($fh); // Finally, reload ICEcoder itself if plugin requires it or just the iFrame screen for the user if it doesn't if ($_GET['action']=="install" && $pluginsData[$_GET['plugin']]['reload'] == "true") {