sync breaks http protocol in firefox




7 years ago
5 months ago


(Reporter: trenton.d.adams, Unassigned)


Firefox Tracking Flags

(Not tracked)



(2 attachments)



7 years ago
Created attachment 620552 [details]

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0
Build ID: 20120423123312

Steps to reproduce:

Sync with firefox sync

Actual results:

Connections to large numbers of sites are now broken due to a bad multi-line Accept-Language header.  I can disable all plugins, and everything is still broken.  I can create a new profile, and it works again, until I sync with firefox sync; I do not need to install any plugins for this to occur.

Expected results:

It shouldn't break my browser.

Comment 1

7 years ago
Created attachment 620554 [details]
another firefox sync log

Comment 2

7 years ago
Here are the headers. If I change the Accept-Language header to be on one line, and telnet to port 80 of, and past that in, everything works just peachy.  This still happens even if all plugins/extensions/languages are disabled with safe mode.

Furthermore, if I restore my ~/.mozilla directory from backups, I can repeat everything.  I restore with a full delete of all content that is not identical to my backup...
rsync --delete-after -avz /media/cvsafe/trenta/remote-trenta-20120427-000715/.mozilla/ ~/.mozilla/

Everything works, until I sync; did I say that already? :D

GET / HTTP/1.1
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.9,fr;q=0.8,en-ca
Accept-Encoding: gzip, deflate
Connection: keep-alive
HTTP/1.0 400 Bad Request
Server: proxygen/113
Content-Length: 50
Content-Type: text/plain
Date: Thu, 03 May 2012 01:24:31 GMT
Connection: close

Comment 3

7 years ago
This was resolved.  IRC conversation below.  If you want more details, to try and find out what happened, let me know.  I was on #sync at the time.

[20:04] <rfkelly> TrentonAdams: I haven't been lurking in #sync, has someone popped up here to help with your bug yet?
[20:05] <TrentonAdams> rfkelly, no but I just filed one, and followed the good practise guideline.  I wish I knew the bug number now, but I restored my profile from backup again, and lost it. :(
[20:05] <rfkelly>
[20:05] <firebot> Bug 751443 nor, --, ---, nobody, UNCO, sync breaks http protocol in firefox
[20:05] <rfkelly> assuming that's you?
[20:06] <TrentonAdams> yeah
[20:06] <TrentonAdams> I also just tried to force overwrite all my sync data with my "good" backup data.  It failed, and I'm having the same problem again.
[20:07] <rfkelly> I work on the server-side stuff for sync, not the client, but I can try to help out
[20:08] <TrentonAdams> My heart is pounding.  I don't like a broken browser, lol.  I'm a web developer, ahhhhh. rofl
[20:08] <rfkelly> The Accept-Languages header is controller by the about:config setting "intl.accept_languages"
[20:08] <TrentonAdams> rfkelly, k, I'll check it out
[20:09] <rfkelly> wondering if editing it directly through about:config will cause it to propagate up and fix the broken sync data
[20:09] <TrentonAdams> rfkelly, looks like some plugin might have modified it to have funny characters, just a sec.
[20:09] <TrentonAdams> yay, works again.
[20:09] <rfkelly> \o/
[20:09] <TrentonAdams> I removed some spaces and what not
[20:10] <rfkelly> hopefully this will sync back up to the server and resolve the problem everywhere
[20:10] <TrentonAdams> rfkelly, thanks very much.  I'll post the result in the bug, and you can close it.  That way if someone else has a problem, they might find it. :D
[20:10] <rfkelly> thanks, glad I was able to help out!
[20:11] <TrentonAdams> rfkelly, mind if I just copy/paste our IRC conversation?
[20:11] <rfkelly> please do
[20:11] <rfkelly> I'll leave closing of the bug to client-side folks, since they may want to investigate where this corruption came from, add some checks against it, etc

Comment 4

7 years ago
One more thing.  I synced again, and another one of my computers is fixed too.  So, it does get propagated back just fine.
Marking confirmed and cc'ing gps for review
Ever confirmed: true
I have no clue how Sync could manage to break the entire network stack.
Component: General → Firefox Sync: Backend
QA Contact: general → sync-backend
Theory: some addon broke it by putting garbage in intl.accept_languages, sync just propagated the breakage to other machines.
We sync that pref, and it's writable by any addon. This bug can better be rephrased as "addons can break Firefox by writing to prefs, and if those prefs are whitelisted for syncing then it'll break your other machines, too".

That's a potential footgun, yes, but Sync is just the gun, not the bit doing the aiming.

There might be a bug here, but it's not a sync bug: it's "intl.accept_languages should be validated". Gonna file that.
Last Resolved: 7 years ago
Resolution: --- → INVALID


5 months ago
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.