113 points · by frankjr · 4y ago · 87 comments
if (contentLengthStart == -1) {
// There is no content-Length.
return;
}
That's the same flow it would have taken with the case sensitive code."I'm just a random kibbitzer, so my apologies if this is off-base, but... isn't an even more fundamental problem here that the code is doing a naive string-based search in the first place? For example, I believe this is a valid HTTP header block that could be passed into this code:
GET / HTTP/1.1\r\nHost: example.com\r\nCookie: foo="Content-Length: 100"\r\n\r\n (In particular, GET requests normally don't have a content-length header at all, since the default if none is present is to assume an empty body.)
Wouldn't this cause the code to compute the wrong body length and break things?"
I am an HTTP/1.1 dinosaur. Is chunked transfer encoding no longer a thing in HTTP/3? It used to be a valid reason to omit Content-Length.
IIRC HTTP/2 and HTTP/3 are essentially always chunked. I would expect a missing content-length to be completely valid.
For HTTP/1.1, a stream where the length is not known upfront required the usage of chunked encoding. With HTTP/2 and /3 that encoding is no longer required since the underlying protocol already support framing and contains and end-of-stream information.
[edited, link was to this same discussion]
Very interesting, is that comment inserted automatically by an IDE?
* valgrind (https://valgrind.org/): Contains a lot of tools
* Heaptrack (https://apps.kde.org/heaptrack/): For memory allocation analysis
* KCachegrind (https://apps.kde.org/kcachegrind/): For call graph vizualisations
* ELF Dissector (https://apps.kde.org/elf-dissector/): For analysis of binary files/dependencies
* Massif-Visualizer (https://apps.kde.org/massif-visualizer/): Valgrind massif visualiser
* Gammaray (https://www.kdab.com/development-resources/qt-tools/gammaray...): Tool to analysis the current state of a Qt project a bit like you would do with firefox inspector.
How is that funny?
For a greenfield component I do kind of agree though. I wonder does Mozilla still have the in-house Rust expertise for something like that after the layoffs?
I'm not sure why it's not used here.
Naturally most of it isn't free beer.
Plenty of nice tooling like Purify, Insure++ and V-Tune exist since decades.
https://lobste.rs/s/zcjtv2/1749908_infinite_loop_http3_hangs...
> [Q] Do I understand from this that Mozilla can just update my browser settings remotely without my updating‽
> [A] Yes. This is part of the “Remote settings” service, which we can use to ship or unship features (or gradually) or recover from breakage (like here!). We mostly use it as a backend for Firefox Sync and certificate revocation lists. Technically, we could also ship a new Firefox executable and undo / change settings, but that would realistically take many more hours. Needless to says, every “large” software project has these capabilities.
This is new to me. Can anyone tell me which other "large" projects have this capability?
I found some detailed information on Mozilla's website [1] and I have three entries about RemoteSettings in about:config.
app.normandy.startupRolloutPrefs.browser.topsites.useRemoteSetting
browser.topsites.useRemoteSetting
browser.urlbar.quicksuggest.remoteSettings.enabled
I turned them to false.
This [2] explains what Normandy is.
[1] https://firefox-source-docs.mozilla.org/services/settings/in...
[2] https://firefox-source-docs.mozilla.org/toolkit/components/n...
FWIW I maintained a popular chrome extension (100k weekly users) and I eventually had to add an extensive set of chicken bits pulled from my server multiple times a day. Why? Because chrome updates take over a day to propagate and the extension could regularly break when webdevs made frontend changes to the websites my end users visited. It simply wasn't feasible to ask end users to manually pull a chrome update every time this happened (not to mention that chrome's extension store is designed to make this very hard.) I added an option to disable it but as far as I know none of my users turned that on.
Not exactly the same but most modern hardware has equivalent functionality where they can flip 'chicken bits' in the hw to disable various features in response to regressions - stuff like spectre or meltdown is a good example. Naturally that is instead flipped by OS or firmware updates, but considering those come down across the wire automatically now, it's basically the same idea.
I completely agree that in the current case resetting it remotely is the easiest solution for both parties. However, it is probably the first time many users learned something like this exists. One would think an open browser promoting user empowerment would have more transparency on this feature and how it can be controlled.
I wonder if this is to blame?
In any case, this is incredibly sketchy behavior for a "user-empowering", "privacy focused" browser.
I'd say that all popular apps (Android/iOS) have such functionality. Most will probably use it for A/B testing, but technically you could change anything you'd like with it.
Apart from the companies creating their own implementations [0], popular services I have seen include Optimizely [1] and Firebase Remote Config [2].
[0]: https://engineering.fb.com/2014/01/09/android/airlock-facebo...
[1]: https://www.optimizely.com/products/intelligence/full-stack-...
I would be very surprised if they did. The Firefox development workflow does not map very well onto Github.
Worse of all case insensitivity, not all languages have the same casing rules, so you just ask for bugs that only appear when your user is not US American.
They should introduce some functional programming into this!
And the implementation of HTTP/3, that was Google QUIC, is required for chasing Chrome's "fire and motion".
The right question is, does pouring resources into their own web page align with their mission statement?
What are they rewriting?
> catch up with Chrome
The standards driven development that Mozilla fostered in the aughts is mostly gone.
Today the standards are mostly written by the dominant browser and everyone else just plays catch up.