diff options
author | Michael Vetter <jubalh@iodoru.org> | 2020-06-19 20:17:20 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2020-06-19 20:17:20 +0200 |
commit | 448f7f0936fe8b92b472cdb608195382b8eeba34 (patch) | |
tree | 4ef2e364e99b8900ae011054e8299311d0b8408a /src/config | |
parent | cffce4de8a28f3b4d929f7fcbf22882dca5a1e59 (diff) | |
download | profani-tty-448f7f0936fe8b92b472cdb608195382b8eeba34.tar.gz |
Use shell to start eval_password command
Since https://github.com/profanity-im/profanity/commit/d92c576aa53505d712715b1acc6344af3262c84f we rely on g_spawn_sync(). Which doesn't do variable/glob expansion. For our use of call_external() in opening and URL or avatar this is fine. For getting the password we want to be able to use ~ for our files. Let's use a shell here. Fix https://github.com/profanity-im/profanity/issues/1364
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/account.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/config/account.c b/src/config/account.c index 1fc13429..6fc80eb7 100644 --- a/src/config/account.c +++ b/src/config/account.c @@ -201,16 +201,12 @@ account_eval_password(ProfAccount *account) assert(account->eval_password != NULL); gchar **output = NULL; - gchar **argv = g_strsplit(account->eval_password, " ", 0); + gchar *argv[] = {"sh", "-c", account->eval_password}; if (!call_external(argv, &output, NULL)) { - g_strfreev(argv); - argv = NULL; return FALSE; } - g_strfreev(argv); - if (!output || !output[0]) { log_error("Failed to read eval_password output"); g_strfreev(output); |