Closed Bug 359106 Opened 18 years ago Closed 3 years ago

Cookie expiration not obeyed for sites accessed by IPv6 address

Categories

(Core :: Networking: Cookies, defect, P3)

1.8 Branch
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: admiralnemo, Unassigned, NeedInfo)

Details

(Whiteboard: [ipv6][necko-backlog])

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1) Gecko/20061025 Firefox/2.0
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1) Gecko/20061025 Firefox/2.0

When accessing a site by its IPv6 address, ie not by hostname, cookies from that site are deleted upon browser close, rather than obeying the expiry time of the cookie.

Reproducible: Always

Steps to Reproduce:
1. Visit a site that saves a cookie by its IPv6 address, ie http://[2001:db8::1]/
2. Open the preferences dialog and observe the cookie for domain 2001:db8::1 and its expiry time.
3. Close the dialogs and browser
4. Open the browser
5. Open the preferences dialog and observe the cookie for domain 2001:db8::1

Actual Results:  
No cookies exist from domain 2001:db8::1

Expected Results:  
Cookies with expiry times other than "end of session" should be saved until they expire.
Component: General → Networking: Cookies
Product: Firefox → Core
QA Contact: general → networking.cookies
Version: unspecified → 1.8 Branch
hmm, what are your cookie preferences, exactly?

please follow the instructions at this url to create a cookie log demonstrating
the problem, and attach it to this bug.

http://www.mozilla.org/projects/netlib/cookies/cookie-log.html
Whiteboard: [ipv6][necko-backlog]
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: -- → P1
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: P1 → P3

This seems to be a devtools issue. The storage panel doesn't show cookies for http://[::1]:8000/ even if the network panel shows them sent in the request. My test file is:

<head>
<script>
function createCookie(name,value,days) {
        if (days) {
                var date = new Date();
                date.setTime(date.getTime()+(days*24*60*60*1000));
                var expires = "; expires="+date.toGMTString();
        }
        else var expires = "";
        document.cookie = name+"="+value+expires+"; path=/";
console.log(document.cookie);
}

</script>
</head>
<body>

<a href="javascript: createCookie('myTest','1','364');">Write cookie</a>
<br>
<br>
Raw cookie:<br>
<script>
document.write(document.cookie);
</script>
</body>
</html>

executed by: php -S "[::1]:8000"

Flags: needinfo?(odvarko)

Ha six-digit bug!

Andrea, I've been testing IVv6 this week in bug 1553774 and it seems to be working for me.

Can you still reproduce this?

Honza

Flags: needinfo?(odvarko) → needinfo?(amarchesini)

Hi Jan

I'm trying to reproduce old bugs to see if we can resolve some.

Due to Firefox having changes after so many years, maybe this problem doesn't happen anymore. I'm wondering if this can be resolved. Do you know?

thanks

Flags: needinfo?(odvarko)

Agree, I couldn't repro (see comment #5), so closing

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Flags: needinfo?(odvarko)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.