diff options
| author | Victor Kareh <[email protected]> | 2025-10-09 09:36:17 -0400 |
|---|---|---|
| committer | Victor Kareh <[email protected]> | 2025-10-15 14:50:37 +0000 |
| commit | cc532ddc666d6ba83f2e4d6b38c41ba1b95acb5d (patch) | |
| tree | 493697ca54b78bf8ab340ba434626648f22b5f31 | |
| parent | 6bc636c2d889c710e189e37819ce623632e80a9b (diff) | |
| download | mate-session-manager-cc532ddc666d6ba83f2e4d6b38c41ba1b95acb5d.tar.bz2 mate-session-manager-cc532ddc666d6ba83f2e4d6b38c41ba1b95acb5d.tar.xz | |
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
Backported from https://gitlab.gnome.org/GNOME/gnome-session/-/commit/fe22c4ee12922d790478bfe8b5b2e7c1313ca2f0
| -rw-r--r-- | mate-session/gsm-util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mate-session/gsm-util.c b/mate-session/gsm-util.c index a760fc3..8269148 100644 --- a/mate-session/gsm-util.c +++ b/mate-session/gsm-util.c @@ -525,7 +525,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; @@ -597,7 +597,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; |
