mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-28 10:18:39 +09:00
import change from tenfourfox:
- #648: M1663836 + update TLDs TZs (4821d63d2)
This commit is contained in:
parent
71e99f28aa
commit
25114ddf5f
5 changed files with 249 additions and 223 deletions
|
|
@ -544,6 +544,18 @@ Http2Decompressor::OutputHeader(const nsACString &name, const nsACString &value)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
// Bug 1663836: reject invalid HTTP response header names - RFC7540 Sec 10.3
|
||||
const char* cFirst = name.BeginReading();
|
||||
if (cFirst != nullptr && *cFirst == ':') {
|
||||
++cFirst;
|
||||
}
|
||||
if (!nsHttp::IsValidToken(cFirst, name.EndReading())) {
|
||||
nsCString toLog(name);
|
||||
LOG(("HTTP Decompressor invalid response header found. [%s]\n",
|
||||
toLog.get()));
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
|
||||
// Look for upper case characters in the name.
|
||||
for (const char *cPtr = name.BeginReading();
|
||||
cPtr && cPtr < name.EndReading();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue