Commit e79000e5 authored by David Edmundson's avatar David Edmundson Committed by David Edmundson
Browse files

[libkworkspace] Guard for environment variables that won't be accepted

Systemd doesn't like values containing escape sequence \033 and a fix
won't be accepted upstream. Users of QT_MESSAGE_PATTERN might have this
set already. The big problem is then we can fail to update important
variables such as DISPLAY which all comes as one big update.
parent 1e444c86
......@@ -101,6 +101,13 @@ void UpdateLaunchEnvJob::start()
dbusActivationEnv.insert(varName, value);
// _user_ systemd env
// Systemd has stricter parsing of valid environment variables
// validate here
if (value.contains(QLatin1Char('\033'))) {
qWarning() << "Skipping syncing of environment variable " << varName << "as value contains unsupported character \\003";
const QString updateString = varName + QStringLiteral("=") + value;
Markdown is supported
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