Regression: Firefox 3.6.18 does not set cookie when talking to single letter hostname
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mozilla Firefox |
Fix Released
|
Medium
|
|||
firefox (Ubuntu) |
Invalid
|
Undecided
|
Chris Coulson | ||
Lucid |
Fix Released
|
Medium
|
Micah Gersten | ||
Maverick |
Fix Released
|
Medium
|
Micah Gersten |
Bug Description
When talking to an hostname consisting of a single letter, Firefox 3.6.18 does not set cookie. Previous version did fine, as well as other browser such as chromium.
How to reproduce:
sudo apt-get install lighttpd
sudo lighttpd-enable-mod cgi
sudo vim /etc/hosts
make 'a' go to 127.0.0.1 as in:
root@machine:
127.0.0.1 localhost a
Then simply install the attached python cgi and go to it in
firefox-3.6.18. In our tests it never set a cookie. When testing with
Chrome, it sets the cookie fine.
root@machine:
Description: Ubuntu 10.04.2 LTS
Release: 10.04
root@machine:
firefox:
Installed: 3.6.18+
Candidate: 3.6.18+
Version table:
I expected my cgi script to print something like:
The returned cookie string was "foo=1308946645.14"
and not:
First visit or cookies disabled.
Changed in firefox (Ubuntu): | |
assignee: | nobody → Chris Coulson (chrisccoulson) |
tags: | added: lucid maverick regression-update |
Changed in firefox (Ubuntu): | |
status: | New → Invalid |
Changed in firefox (Ubuntu Lucid): | |
assignee: | nobody → Chris Coulson (chrisccoulson) |
Changed in firefox (Ubuntu): | |
assignee: | Chris Coulson (chrisccoulson) → nobody |
Changed in firefox (Ubuntu Maverick): | |
importance: | Undecided → Medium |
Changed in firefox (Ubuntu Lucid): | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in firefox (Ubuntu Maverick): | |
status: | New → Triaged |
Changed in firefox: | |
importance: | Unknown → Medium |
status: | Unknown → Confirmed |
summary: |
- Regression: Firefox 3.6.18 do not set cookie when talking to single + Regression: Firefox 3.6.18 does not set cookie when talking to single letter hostname |
Changed in firefox: | |
status: | Confirmed → Fix Released |
I'm reporting this from https:/ /bugs.launchpad .net/ubuntu/ +source/ firefox/ +bug/801778
Since Firefox 3.6.18, cookies cannot be stored with single character hostnames. This is reproducible by installing the extension developer addon and doing this in the JS shell:
cm = Cc["@mozilla. org/cookiemanag er;1"]. getService( Ci.nsICookieMan ager2); FromHost( "a"); /* Should be 0 */ FromHost( "a"); /* Is still 0, but should now be 1 */
expiry = (Date.now() + 1000) * 1000;
cm.countCookies
cm.add("a", "/", "foo", "bar", false, false, true, expiry);
cm.countCookies
This wasn't a problem in 3.6.17. It doesn't seem to be a problem on current nightlies or aurora either (I didn't test 5.0)
I see there's a couple of suspect commits between 3.6.17 and 3.6.18, but I'm still waiting for my mozilla-1.9.2 tree to build before I can actually verify that:
http:// hg.mozilla. org/releases/ mozilla- 1.9.2/rev/ bb935ffe5ff1 hg.mozilla. org/releases/ mozilla- 1.9.2/rev/ bb728fdcd717
http://