summaryrefslogtreecommitdiff
path: root/gnome-session
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2020-10-19 16:27:59 +0200
committerBenjamin Berg <benjamin@sipsolutions.net>2020-12-03 16:19:27 +0000
commitfe22c4ee12922d790478bfe8b5b2e7c1313ca2f0 (patch)
treef62bba62c1b0181357c3cb2240d980c3b05b52da /gnome-session
parentd82db7c123d8b346834bd7680073d5ae1882868d (diff)
downloadgnome-session-fe22c4ee12922d790478bfe8b5b2e7c1313ca2f0.tar.gz
util: Only accept common space characters
Specifically, systemd only permits " \t\n" and we should stick to the same set of permitted space characters. See also https://github.com/systemd/systemd/issues/17378 Closes: #70
Diffstat (limited to 'gnome-session')
-rw-r--r--gnome-session/gsm-util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnome-session/gsm-util.c b/gnome-session/gsm-util.c
index 18a94700..9d05fd7b 100644
--- a/gnome-session/gsm-util.c
+++ b/gnome-session/gsm-util.c
@@ -550,7 +550,7 @@ gsm_util_export_activation_environment (GError **error)
return FALSE;
}
- value_regex = g_regex_new ("^([[:blank:]]|[^[:cntrl:]])*$", G_REGEX_OPTIMIZE, 0, error);
+ value_regex = g_regex_new ("^([ \t\n]|[^[:cntrl:]])*$", G_REGEX_OPTIMIZE, 0, error);
if (value_regex == NULL) {
return FALSE;
@@ -633,7 +633,7 @@ gsm_util_export_user_environment (GError **error)
return FALSE;
}
- regex = g_regex_new ("^[a-zA-Z_][a-zA-Z0-9_]*=([[:blank:]]|[^[:cntrl:]])*$", G_REGEX_OPTIMIZE, 0, error);
+ regex = g_regex_new ("^[a-zA-Z_][a-zA-Z0-9_]*=([ \t\n]|[^[:cntrl:]])*$", G_REGEX_OPTIMIZE, 0, error);
if (regex == NULL) {
return FALSE;