Security: fix 0777 directory permissions to 0755.
This commit is contained in:
@@ -43,7 +43,7 @@ namespace HTTP
|
|||||||
// TODO validate path? (would require to expose fgValidatePath somehow to
|
// TODO validate path? (would require to expose fgValidatePath somehow to
|
||||||
// simgear)
|
// simgear)
|
||||||
SGPath path(_filename);
|
SGPath path(_filename);
|
||||||
path.create_dir(0777);
|
path.create_dir(0755);
|
||||||
|
|
||||||
_file.open(_filename.c_str(), std::ios::binary | std::ios::trunc);
|
_file.open(_filename.c_str(), std::ios::binary | std::ios::trunc);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -616,7 +616,7 @@ writeProperties (const string &file, const SGPropertyNode * start_node,
|
|||||||
bool write_all, SGPropertyNode::Attribute archive_flag)
|
bool write_all, SGPropertyNode::Attribute archive_flag)
|
||||||
{
|
{
|
||||||
SGPath path(file.c_str());
|
SGPath path(file.c_str());
|
||||||
path.create_dir(0777);
|
path.create_dir(0755);
|
||||||
|
|
||||||
ofstream output(file.c_str());
|
ofstream output(file.c_str());
|
||||||
if (output.good()) {
|
if (output.good()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user