We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c3a256 commit eba61dfCopy full SHA for eba61df
src/scripting/StelScriptOutput.cpp
@@ -62,6 +62,12 @@ void StelScriptOutput::saveOutputAs(const QString &name)
62
63
const bool okToSaveToAbsolutePath=StelApp::getInstance().getSettings()->value("scripts/flag_script_allow_write_absolute_path", false).toBool();
64
65
+ if (name.contains("config.ini"))
66
+ {
67
+ qWarning() << "SCRIPTING ERROR: You are trying to overwrite config.ini. Ignoring.";
68
+ return;
69
+ }
70
+
71
if (!okToSaveToAbsolutePath && ((newFileNameInfo.isAbsolute() || (name.contains(".."))))) // The last condition may include dangerous/malicious paths
72
{
73
qWarning() << "SCRIPTING CONFIGURATION ISSUE: You are trying to save to an absolute pathname or move up in directories.";
0 commit comments