Commit 849624af authored by vogelor's avatar vogelor
Browse files

protect the content of the temporary data of the rescue-module

parent 68674286
...@@ -161,8 +161,10 @@ class rescue_core_module { ...@@ -161,8 +161,10 @@ class rescue_core_module {
/* /*
* We have the newest monitoring data. Save it! * 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)); file_put_contents($dataFilename, serialize($data));
chmod($dataFilename, 0600);
/* Thats it */ /* Thats it */
return $data; return $data;
...@@ -207,7 +209,12 @@ class rescue_core_module { ...@@ -207,7 +209,12 @@ class rescue_core_module {
*/ */
private function _saveRescueData() { private function _saveRescueData() {
$dataFilename = dirname(__FILE__) . "/../temp/rescue_module_rescuedata.ser.txt"; $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)); file_put_contents($dataFilename, serialize($this->_rescueData));
chmod($dataFilename, 0600);
} }
/** /**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment