]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Limit HeaderLookupTable_t::lookup() to BadHdr and specific IDs
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 16 Mar 2021 15:45:11 +0000 (11:45 -0400)
committerAmos Jeffries <yadij@users.noreply.github.com>
Sun, 4 Apr 2021 05:16:24 +0000 (17:16 +1200)
src/http/RegisteredHeaders.cc

index 6b420638e6865c0f8837c4742fc0b483bbe60845..348a1bb821d842c28e514608cbcb6aca583ca6bf 100644 (file)
@@ -37,7 +37,7 @@ HeaderTableRecord::HeaderTableRecord(const char *n, HdrType theId, HdrFieldType
 const HeaderTableRecord&
 HeaderLookupTable_t::lookup (const char *buf, const std::size_t len) const {
     const HeaderTableRecord *r = HttpHeaderHashTable::lookup(buf, len);
-    if (!r)
+    if (!r || r->id == Http::HdrType::OTHER)
         return BadHdr;
     return *r;
 }