Skip to content

Commit cdc7059

Browse files
committed
Teach appendShellString() to not quote strings containing "-".
Brain fade in commit a00c583: I was thinking that a string starting with "-" could be taken as a switch depending on command line syntax. That's true, but having appendShellString() quote it will not help, so we may as well not do so. Per complaint from Peter Eisentraut.
1 parent a2ee579 commit cdc7059

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fe_utils/string_utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ appendShellString(PQExpBuffer buf, const char *str)
439439
* contains only safe characters.
440440
*/
441441
if (*str != '\0' &&
442-
strspn(str, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_./:") == strlen(str))
442+
strspn(str, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_./:") == strlen(str))
443443
{
444444
appendPQExpBufferStr(buf, str);
445445
return;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy