* replace nonprintable chars in http headerlines by § so bad guys don't jam us.
authorWilfried Göesgens <willi@citadel.org>
Wed, 11 Feb 2009 19:50:02 +0000 (19:50 +0000)
committerWilfried Göesgens <willi@citadel.org>
Wed, 11 Feb 2009 19:50:02 +0000 (19:50 +0000)
webcit/context_loop.c

index c8461d2c8f56741209994d08d953c68db1c9ff25..ddfd3bc21019f3d33ae4a00d0ef576f68e6feca2 100644 (file)
@@ -319,8 +319,8 @@ void context_loop(int *sock)
                        continue;
                }
 
+               StrBufSanitizeAscii(Line, '§');
                StrBufExtract_token(HeaderName, Line, 0, ':');
-               /*/// TODO: filter bad chars! */
 
                pchs = ChrPtr(Line);
                pch = pchs + StrLength(HeaderName) + 1;