]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
log_quote() and username_quote() should always quote the '%' character
authorwessels <>
Tue, 10 Jun 2003 03:52:21 +0000 (03:52 +0000)
committerwessels <>
Tue, 10 Jun 2003 03:52:21 +0000 (03:52 +0000)
since it is used to encode other characters.

src/access_log.cc

index 8c481e4b8cef7df451908a32dbe6d7bc1b6a0eef..72fbd21c2813d84b902164de641e208c460438ab 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: access_log.cc,v 1.81 2003/02/23 00:08:03 robertc Exp $
+ * $Id: access_log.cc,v 1.82 2003/06/09 21:52:21 wessels Exp $
  *
  * DEBUG: section 46    Access Log
  * AUTHOR: Duane Wessels
@@ -156,10 +156,10 @@ log_quote(const char *header)
 #endif
             if (c <= 0x1F
                     || c >= 0x7F
+                    || c == '%'
 #if OLD_LOG_MIME
                     || c == '"'
                     || c == '#'
-                    || c == '%'
                     || c == ';'
                     || c == '<'
                     || c == '>'
@@ -225,6 +225,7 @@ username_quote(const char *header)
             *buf_cursor++ = 'n';
         } else if (c <= 0x1F
                    || c >= 0x7F
+                   || c == '%'
                    || c == ' ') {
             *buf_cursor++ = '%';
             i = c * 2;