Open Bug 1232213 Opened 10 years ago Updated 5 years ago

Secure Connection Failed with long cookies and mosquitto websockets

Categories

(Core :: Networking, defect, P5)

42 Branch
defect

Tracking

()

People

(Reporter: drJeckyll, Unassigned)

Details

(Keywords: reproducible, testcase, Whiteboard: [necko-backlog])

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0 Build ID: 20151029151421 Steps to reproduce: When I try to open https://my.server.address:1888/ with Firefox 42 (latest trunk also don't work) I receive: Secure Connection Failed The connection to the server was reset while the page was loading. The page you are trying to view cannot be shown because the authenticity of the received data could not be verified. Please contact the website owners to inform them of this problem. Actual results: I have mosquitto with websockets and SSL on port 1888. I also have normal ssl site on the same my.server.address on port 443 and this site set some cookies on Firefox. Problem is that one of the cookies make Firefox to show "Secure Connection Failed" error message on port 1888, but works fine on 443. If I delete this cookie or length of cookie is bellow some limit everything works fine. But when cookie become too long Firefox start to show error message on port 1888. For example this cookie work (length 514): a%3A19%3A%7Bi%3A1%3Bi%3A1450044686%3Bi%3A2%3Bi%3A1450044686%3Bi%3A3%3Bi%3A1450044686%3Bi%3A5%3Bi%3A1450044686%3Bi%3A6%3Bi%3A1450044686%3Bi%3A7%3Bi%3A1450044686%3Bi%3A59%3Bi%3A1450044686%3Bi%3A84%3Bi%3A1450044686%3Bi%3A101%3Bi%3A1450044686%3Bi%3A802%3Bi%3A1450044686%3Bi%3A236%3Bi%3A1450044689%3Bi%3A233%3Bi%3A1450044692%3Bi%3A241%3Bi%3A1450044695%3Bi%3A235%3Bi%3A1450044698%3Bi%3A234%3Bi%3A1450044704%3Bi%3A238%3Bi%3A1450044706%3Bi%3A240%3Bi%3A1450044710%3Bi%3A239%3Bi%3A1450044713%3Bi%3A237%3Bi%3A1450044719%3B%7D But this not (length 541): a%3A20%3A%7Bi%3A1%3Bi%3A1450044545%3Bi%3A2%3Bi%3A1450044545%3Bi%3A3%3Bi%3A1450044545%3Bi%3A5%3Bi%3A1450044545%3Bi%3A6%3Bi%3A1450044545%3Bi%3A7%3Bi%3A1450044545%3Bi%3A59%3Bi%3A1450044545%3Bi%3A84%3Bi%3A1450044545%3Bi%3A101%3Bi%3A1450044545%3Bi%3A802%3Bi%3A1450044545%3Bi%3A236%3Bi%3A1450044585%3Bi%3A233%3Bi%3A1450044589%3Bi%3A241%3Bi%3A1450044593%3Bi%3A235%3Bi%3A1450044598%3Bi%3A234%3Bi%3A1450044603%3Bi%3A238%3Bi%3A1450044610%3Bi%3A240%3Bi%3A1450044616%3Bi%3A239%3Bi%3A1450044637%3Bi%3A237%3Bi%3A1450044642%3Bi%3A244%3Bi%3A1450044647%3B%7D Same setup and cookie works OK with Chrome. Actually in Chrome it works with longer cookie (length 595). In private window it works OK, but it is expected since there is no cookies.
Component: Untriaged → Networking
Product: Firefox → Core
Can you provide a testcase?
Flags: needinfo?(drJeckyll)
Let's try. 1. Open: https://f1.f-e-n.net:1888/ you must see 404 which is OK 2. Open this: https://f1.f-e-n.net/test.php which will set cookie 'test' with string from my first comment (length 541) 3. Open again: https://f1.f-e-n.net:1888/ Secure Connection Failed 4. Delete cookie 'test' from f1.f-e-n.net. Open again https://f1.f-e-n.net:1888/ 404 which is OK
Flags: needinfo?(drJeckyll)
(In reply to drJeckyll from comment #2) > Let's try. > > 1. Open: https://f1.f-e-n.net:1888/ > you must see 404 which is OK > > 2. Open this: https://f1.f-e-n.net/test.php > which will set cookie 'test' with string from my first comment (length 541) > > 3. Open again: https://f1.f-e-n.net:1888/ > Secure Connection Failed I see 404 again here, so I can't reproduce. Tested with current Nightly (45) on Windows 8. Can you retry on a second, clean profile ( https://support.mozilla.org/kb/profile-manager-create-and-remove-firefox-profiles ) ?
Flags: needinfo?(drJeckyll)
OK - I deleted my old profile and start again. My test case was wrong and everything workd. But then I set another cookie 'wall' (along with 'test') and now even with new profile it breaks. So ... 1. Open https://f1.f-e-n.net/test.php This will set cookies 'test' and 'wall' with same content 2. Open https://f1.f-e-n.net:1888/ Secure Connection Failed Firefox 45.0a1 (2015-12-14) with e10s enabled on Linux here.
Flags: needinfo?(drJeckyll)
(In reply to drJeckyll from comment #4) > OK - I deleted my old profile and start again. My test case was wrong and > everything workd. > But then I set another cookie 'wall' (along with 'test') and now even with > new profile it breaks. > So ... > > 1. Open https://f1.f-e-n.net/test.php > This will set cookies 'test' and 'wall' with same content > > 2. Open https://f1.f-e-n.net:1888/ > Secure Connection Failed > > Firefox 45.0a1 (2015-12-14) with e10s enabled on Linux here. OK, I can reproduce this on Windows as well. keeler, any chance you have time to investigate what's going on here? Seems odd that cookies should cause the SSL connection itself to fail.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(dkeeler)
Using wireshark, what I'm seeing is the server is closing the connection without sending any application data (after completing the handshake). I would start by investigating why it's doing that.
Flags: needinfo?(dkeeler) → needinfo?(drJeckyll)
(In reply to David Keeler [:keeler] (use needinfo?) from comment #6) > Using wireshark, what I'm seeing is the server is closing the connection > without sending any application data (after completing the handshake). I > would start by investigating why it's doing that. If it is a question for men - I don't know. May be it is Mosuitto bug or?
Flags: needinfo?(drJeckyll)
Whiteboard: [necko-backlog]
Priority: -- → P1
Priority: P1 → P3

Bulk-downgrade of unassigned, >=3 years untouched DOM/Storage bug's priority.

If you have reason to believe this is wrong, please write a comment and ni :jstutte.

Severity: normal → S4
Priority: P3 → P5
You need to log in before you can comment on or make changes to this bug.