зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1421324 - Modify rejection timing when processing httponly cookie on CookieServiceChild. r=jdm
This commit is contained in:
Родитель
5b721eca4c
Коммит
222e1893c3
|
@ -181,7 +181,7 @@ CookieServiceChild::RecvAddCookie(const CookieStruct &aCookie,
|
|||
aCookie.creationTime(),
|
||||
aCookie.isSession(),
|
||||
aCookie.isSecure(),
|
||||
false,
|
||||
aCookie.isHttpOnly(),
|
||||
aAttrs,
|
||||
aCookie.sameSite());
|
||||
RecordDocumentCookie(cookie, aAttrs);
|
||||
|
@ -362,9 +362,6 @@ CookieServiceChild::SetCookieInternal(nsCookieAttributes &aCookieAt
|
|||
bool aFromHttp,
|
||||
nsICookiePermission *aPermissionService)
|
||||
{
|
||||
if (aCookieAttributes.isHttpOnly) {
|
||||
return;
|
||||
}
|
||||
int64_t currentTimeInUsec = PR_Now();
|
||||
RefPtr<nsCookie> cookie =
|
||||
nsCookie::Create(aCookieAttributes.name,
|
||||
|
@ -430,7 +427,9 @@ CookieServiceChild::RecordDocumentCookie(nsCookie *aCookie,
|
|||
return;
|
||||
}
|
||||
|
||||
cookiesList->AppendElement(aCookie);
|
||||
if (!aCookie->IsHttpOnly()) {
|
||||
cookiesList->AppendElement(aCookie);
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
|
@ -91,6 +91,7 @@ GetInfoFromCookie(nsCookie *aCookie,
|
|||
aCookieStruct.creationTime() = aCookie->CreationTime();
|
||||
aCookieStruct.isSession() = aCookie->IsSession();
|
||||
aCookieStruct.isSecure() = aCookie->IsSecure();
|
||||
aCookieStruct.isHttpOnly() = aCookie->IsHttpOnly();
|
||||
aCookieStruct.sameSite() = aCookie->SameSite();
|
||||
}
|
||||
|
||||
|
@ -140,9 +141,7 @@ CookieServiceParent::AddCookie(nsICookie *aCookie)
|
|||
OriginAttributes attrs = cookie->OriginAttributesRef();
|
||||
CookieStruct cookieStruct;
|
||||
GetInfoFromCookie(cookie, cookieStruct);
|
||||
if (!cookie->IsHttpOnly()) {
|
||||
Unused << SendAddCookie(cookieStruct, attrs);
|
||||
}
|
||||
Unused << SendAddCookie(cookieStruct, attrs);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -221,6 +221,7 @@ struct CookieStruct
|
|||
int64_t expiry;
|
||||
int64_t lastAccessed;
|
||||
int64_t creationTime;
|
||||
bool isHttpOnly;
|
||||
bool isSession;
|
||||
bool isSecure;
|
||||
int8_t sameSite;
|
||||
|
|
Загрузка…
Ссылка в новой задаче