From 6aae6603af7b3d93bcf6b74b72d7475ecf3eec20 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Sun, 20 Jan 2002 16:49:10 +0000 Subject: * command.c (cmd_get_passphrase): Remove the plus signs. * query.c (start_pinentry): Send no-grab option to pinentry * gpg-agent.c (main): Move variable grab as no_grab to agent.h. --- agent/command.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'agent/command.c') diff --git a/agent/command.c b/agent/command.c index dae6c34e6..37276991c 100644 --- a/agent/command.c +++ b/agent/command.c @@ -266,6 +266,16 @@ cmd_genkey (ASSUAN_CONTEXT ctx, char *line) } +static void +plus_to_blank (char *s) +{ + for (; *s; s++) + { + if (*s == '+') + *s = ' '; + } +} + /* GET_PASSPHRASE [ ] This function is usually used to ask for a passphrase to be used @@ -340,6 +350,17 @@ cmd_get_passphrase (ASSUAN_CONTEXT ctx, char *line) } else { + /* Note, that we only need to repalce the + characters and + should leave the other escaping in place becuase the escaped + sting is send verbatim to the pinentry which does the + unescaping (but not the + replacing) */ + if (errtext) + plus_to_blank (errtext); + if (prompt) + plus_to_blank (prompt); + if (desc) + plus_to_blank (desc); + rc = agent_get_passphrase (&response, desc, prompt, errtext); if (!rc) { -- cgit