From 26793c6bddbb8a9420ab20df44fdcb7af0f8562f Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Thu, 6 Jan 2022 10:40:34 +0100 Subject: [PATCH] Escape passwords --- awesome-wm-widgets/email-widget/email.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/awesome-wm-widgets/email-widget/email.lua b/awesome-wm-widgets/email-widget/email.lua index 672932c..c64eb2d 100644 --- a/awesome-wm-widgets/email-widget/email.lua +++ b/awesome-wm-widgets/email-widget/email.lua @@ -20,14 +20,14 @@ local password1 = '' local password2 = '' local password3 = '' -awful.spawn.easy_async_with_shell('pass web/mail.ovh.com; pass web/webmail.gandi.net; pass web/inp-toulouse.fr;', function(stdout) +awful.spawn.easy_async_with_shell('pass web/mail.ovh.com; pass web/webmail.gandi.net; pass web/cas.inp-toulouse.fr;', function(stdout) s = split(stdout, '\n') password1 = s[1] password2 = s[2] password3 = s[3] watch( - "bash -c '" .. home .. "/.config/awesome/awesome-wm-widgets/email-widget/count_unread_emails.py " .. password1 .. " " .. password2 .. " " .. password3 .. "'", 60, + "bash -c '" .. home .. "/.config/awesome/awesome-wm-widgets/email-widget/count_unread_emails.py \"" .. password1 .. "\" \"" .. password2 .. "\" \"" .. password3 .. "\"'", 60, function(widget, stdout, stderr, exitreason, exitcode) local unread_emails_num = tonumber(stdout) or 0 @@ -65,7 +65,7 @@ function split(str, delimiter) end function show_emails(timeout) - awful.spawn.easy_async_with_shell(home .. "/.config/awesome/awesome-wm-widgets/email-widget/read_unread_emails.py " .. password1 .. " " .. password2 .. " " .. password3, + awful.spawn.easy_async_with_shell(home .. "/.config/awesome/awesome-wm-widgets/email-widget/read_unread_emails.py \"" .. password1 .. "\" \"" .. password2 .. "\" \"" .. password3 .."\"", function(stdout, stderr, reason, exit_code) s = split(stderr, '\n')