зеркало из https://github.com/mozilla/gecko-dev.git
only correct cookies if the expires time is non-zero.
(zero means the cookie should expire at the end of the current session.) fix by=morse, r=sspitzer, part of bug #15111
This commit is contained in:
Родитель
e55d8458f0
Коммит
9459932322
|
@ -1452,7 +1452,12 @@ Fix4xCookies(nsIFileSpec * profilePath) {
|
|||
unsigned long expires = strtoul(expiresCString, nsnull, 10);
|
||||
nsCRT::free(expiresCString);
|
||||
|
||||
expires -= SECONDS_BETWEEN_1900_AND_1970;
|
||||
/* if the cookie is supposed to expire at the end of the session
|
||||
* expires == 0. don't adjust those cookies.
|
||||
*/
|
||||
if (expires) {
|
||||
expires -= SECONDS_BETWEEN_1900_AND_1970;
|
||||
}
|
||||
char dateString[36];
|
||||
PR_snprintf(dateString, sizeof(dateString), "%lu", expires);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче