diff options
author | William A. Rowe Jr <wrowe@apache.org> | 2002-03-22 06:52:16 +0100 |
---|---|---|
committer | William A. Rowe Jr <wrowe@apache.org> | 2002-03-22 06:52:16 +0100 |
commit | 9f94a0001617a901909dd42f31bb81e472443a73 (patch) | |
tree | a70aac3a64316d4303c6f0827304b45a8536c214 /server/gen_test_char.c | |
parent | document yet another worker MPM glitch (diff) | |
download | apache2-9f94a0001617a901909dd42f31bb81e472443a73.tar.xz apache2-9f94a0001617a901909dd42f31bb81e472443a73.zip |
Err, that was a bit redundant. Eliminate the redundant test [and clean
up some tabs I inadvertantly introduced.]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94118 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/gen_test_char.c')
-rw-r--r-- | server/gen_test_char.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/server/gen_test_char.c b/server/gen_test_char.c index 9b62163e87..946bb7bb0a 100644 --- a/server/gen_test_char.c +++ b/server/gen_test_char.c @@ -102,14 +102,6 @@ int main(int argc, char *argv[]) printf("\n "); /* escape_shell_cmd */ - if (strchr("&;`'\"|*?~<>^()[]{}$\\\n", c)) { - flags |= T_ESCAPE_SHELL_CMD; - } - - if (!apr_isalnum(c) && !strchr("$-_.+!*'(),:@&=~", c)) { - flags |= T_ESCAPE_PATH_SEGMENT; - } - #if defined(WIN32) || defined(OS2) /* Win32/OS2 have many of the same vulnerable characters * as Unix sh, plus the carriage return and percent char. @@ -118,16 +110,22 @@ int main(int argc, char *argv[]) * and neither lf nor cr can be escaped. We escape unix * specific as well, to assure that cross-compiled unix * applications behave similiarly when invoked on win32/os2. + * + * Rem please keep in-sync with apr's list in win32/filesys.c */ if (strchr("&;`'\"|*?~<>^()[]{}$\\\n\r%", c)) { - flags |= T_ESCAPE_SHELL_CMD; - } + flags |= T_ESCAPE_SHELL_CMD; + } #else if (strchr("&;`'\"|*?~<>^()[]{}$\\\n", c)) { - flags |= T_ESCAPE_SHELL_CMD; - } + flags |= T_ESCAPE_SHELL_CMD; + } #endif + if (!apr_isalnum(c) && !strchr("$-_.+!*'(),:@&=~", c)) { + flags |= T_ESCAPE_PATH_SEGMENT; + } + if (!apr_isalnum(c) && !strchr("$-_.+!*'(),:@&=/~", c)) { flags |= T_OS_ESCAPE_PATH; } |