From 849624af667b7090fcbcf56d7d6a28d5a2c029d6 Mon Sep 17 00:00:00 2001 From: vogelor Date: Tue, 29 Mar 2011 11:00:35 +0000 Subject: [PATCH] protect the content of the temporary data of the rescue-module --- server/mods-available/rescue_core_module.inc.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/mods-available/rescue_core_module.inc.php b/server/mods-available/rescue_core_module.inc.php index 0763965313..6a8634442a 100644 --- a/server/mods-available/rescue_core_module.inc.php +++ b/server/mods-available/rescue_core_module.inc.php @@ -161,8 +161,10 @@ class rescue_core_module { /* * We have the newest monitoring data. Save it! + * (and protect it, because there may be sensible data in it) */ file_put_contents($dataFilename, serialize($data)); + chmod($dataFilename, 0600); /* Thats it */ return $data; @@ -207,7 +209,12 @@ class rescue_core_module { */ private function _saveRescueData() { $dataFilename = dirname(__FILE__) . "/../temp/rescue_module_rescuedata.ser.txt"; + /* + * We have the newest data. Save it! + * (and protect it, because there may be sensible data in it) + */ file_put_contents($dataFilename, serialize($this->_rescueData)); + chmod($dataFilename, 0600); } /** -- GitLab