mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-09 12:54:23 +01:00
gpg-connect-agent: Fix quoting of internal percent+ function.
* tools/gpg-connect-agent.c (get_var_ext) <percent, percent+): Also escape '+'. -- GnuPG-bug-id: 1841 Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
3f9f33bbcb
commit
be13627345
@ -499,8 +499,8 @@ arithmetic_op (int operator, const char *operands)
|
|||||||
percent ARGS
|
percent ARGS
|
||||||
percent+ ARGS
|
percent+ ARGS
|
||||||
Escape the args using the percent style. Tabs, formfeeds,
|
Escape the args using the percent style. Tabs, formfeeds,
|
||||||
linefeeds and carriage returns are also escaped.
|
linefeeds, carriage return, and the plus sign are also
|
||||||
"percent+" also maps spaces to plus characters.
|
escaped. "percent+" also maps spaces to plus characters.
|
||||||
|
|
||||||
errcode ARG
|
errcode ARG
|
||||||
Assuming ARG is an integer, return the gpg-error code.
|
Assuming ARG is an integer, return the gpg-error code.
|
||||||
@ -592,12 +592,12 @@ get_var_ext (const char *name)
|
|||||||
else if ( (s - name) == 7 && !strncmp (name, "percent", 7))
|
else if ( (s - name) == 7 && !strncmp (name, "percent", 7))
|
||||||
{
|
{
|
||||||
s++;
|
s++;
|
||||||
result = percent_escape (s, "\t\r\n\f\v");
|
result = percent_escape (s, "+\t\r\n\f\v");
|
||||||
}
|
}
|
||||||
else if ( (s - name) == 8 && !strncmp (name, "percent+", 8))
|
else if ( (s - name) == 8 && !strncmp (name, "percent+", 8))
|
||||||
{
|
{
|
||||||
s++;
|
s++;
|
||||||
result = percent_escape (s, "\t\r\n\f\v");
|
result = percent_escape (s, "+\t\r\n\f\v");
|
||||||
for (p=result; *p; p++)
|
for (p=result; *p; p++)
|
||||||
if (*p == ' ')
|
if (*p == ' ')
|
||||||
*p = '+';
|
*p = '+';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user