Skip to content

Commit 849624a

Browse files
author
vogelor
committed
protect the content of the temporary data of the rescue-module
1 parent 6867428 commit 849624a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

server/mods-available/rescue_core_module.inc.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,10 @@ private function _getMonitoringData() {
161161

162162
/*
163163
* We have the newest monitoring data. Save it!
164+
* (and protect it, because there may be sensible data in it)
164165
*/
165166
file_put_contents($dataFilename, serialize($data));
167+
chmod($dataFilename, 0600);
166168

167169
/* Thats it */
168170
return $data;
@@ -207,7 +209,12 @@ private function _getRescueData() {
207209
*/
208210
private function _saveRescueData() {
209211
$dataFilename = dirname(__FILE__) . "/../temp/rescue_module_rescuedata.ser.txt";
212+
/*
213+
* We have the newest data. Save it!
214+
* (and protect it, because there may be sensible data in it)
215+
*/
210216
file_put_contents($dataFilename, serialize($this->_rescueData));
217+
chmod($dataFilename, 0600);
211218
}
212219

213220
/**

0 commit comments

Comments
 (0)