bug 1022195 - http2 allow indexing of cookie crumbs with decent entropy r=hurley

--HG--
extra : rebase_source : fb48d4aaf4d81007ac5532f493a87babb23257f7
This commit is contained in:
Patrick McManus 2014-06-07 11:54:38 -04:00
parent edb88482f8
commit 6e06b87dfa

View File

@ -1062,10 +1062,12 @@ Http2Compressor::EncodeHeaderBlock(const nsCString &nvInput,
}
nsDependentCSubstring cookie = Substring(beginBuffer + nextCookie,
beginBuffer + semiSpaceIndex);
ProcessHeader(nvPair(name, cookie), true);
// cookies less than 20 bytes are not indexed
ProcessHeader(nvPair(name, cookie), name.Length() < 20);
nextCookie = semiSpaceIndex + 2;
}
} else {
// allow indexing of every non-cookie except authorization
ProcessHeader(nvPair(name, value), name.EqualsLiteral("authorization"));
}
}