mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-24 16:17:29 +09:00
[network] Block set-cookie from multipart/x-mixed-replace
This commit is contained in:
parent
2eea07fc65
commit
9d320dac80
1 changed files with 4 additions and 1 deletions
|
|
@ -1018,11 +1018,14 @@ nsMultiMixedConv::ParseHeaders(nsIChannel *aChannel, char *&aPtr,
|
||||||
} else if (headerStr.LowerCaseEqualsLiteral("content-disposition")) {
|
} else if (headerStr.LowerCaseEqualsLiteral("content-disposition")) {
|
||||||
mContentDisposition = headerVal;
|
mContentDisposition = headerVal;
|
||||||
} else if (headerStr.LowerCaseEqualsLiteral("set-cookie")) {
|
} else if (headerStr.LowerCaseEqualsLiteral("set-cookie")) {
|
||||||
|
// Do not allow cookies to be set from multipart/mixed content parts
|
||||||
|
// as a mitigation to CVE-2024-1551
|
||||||
|
/*
|
||||||
nsCOMPtr<nsIHttpChannelInternal> httpInternal =
|
nsCOMPtr<nsIHttpChannelInternal> httpInternal =
|
||||||
do_QueryInterface(aChannel);
|
do_QueryInterface(aChannel);
|
||||||
if (httpInternal) {
|
if (httpInternal) {
|
||||||
httpInternal->SetCookie(headerVal.get());
|
httpInternal->SetCookie(headerVal.get());
|
||||||
}
|
}*/
|
||||||
} else if (headerStr.LowerCaseEqualsLiteral("content-range") ||
|
} else if (headerStr.LowerCaseEqualsLiteral("content-range") ||
|
||||||
headerStr.LowerCaseEqualsLiteral("range") ) {
|
headerStr.LowerCaseEqualsLiteral("range") ) {
|
||||||
// something like: Content-range: bytes 7000-7999/8000
|
// something like: Content-range: bytes 7000-7999/8000
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue