libpriv/util: Expand set of safe shell chars

Expand the set to include '/' and '=' since those don't need escaping in
shells.

Closes: #1824
Approved by: rfairley
This commit is contained in:
Jonathan Lebon 2019-05-03 15:17:39 -04:00 committed by Atomic Bot
parent d113b6a913
commit 01fbaa7ba4

View File

@ -1240,7 +1240,7 @@ rpmostree_maybe_shell_quote (const char *s)
static GRegex *safe_chars_regex;
if (g_once_init_enter (&regex_initialized))
{
safe_chars_regex = g_regex_new ("^[[:alnum:]-._]+$", 0, 0, NULL);
safe_chars_regex = g_regex_new ("^[[:alnum:]-._/=]+$", 0, 0, NULL);
g_assert (safe_chars_regex);
g_once_init_leave (&regex_initialized, 1);
}