launcher
launcher copied to clipboard
Backfill support for all datatypes for Firefox and Chrome extension databases
We've been adding support for datatypes as we see them come up, which means that by the time we hit a parsing error, we need to do a full launcher release before end users will see the fix reflected.
We should proactively go through the Chrome/Firefox code and add support to parsing for all data types we haven't yet covered.
Go through the Chrome and Firefox code (linked here at the bottom of this section) and compare the data types listed there with our Firefox and Chrome parsing support.
For each data type that we don't yet cover:
- [ ] Add the data type to our test databases for both Chrome and Firefox, following the instructions here: https://github.com/kolide/launcher/tree/main/ee/katc/test_data#instructions-for-generating-new-test-indexeddbs
- [ ] Implement parsing for the data type for Firefox: https://github.com/kolide/launcher/blob/main/ee/katc/deserialize_firefox.go
- [ ] Implement parsing for the data type for Chrome: https://github.com/kolide/launcher/blob/main/ee/indexeddb/values.go
I feel like I asked this before, but is there a way to skip the unparsable values?
@directionless not reliably, no -- when we get to a value with an unsupported data type tag, we aren't able to advance through it confidently to the next key-value pair because values have variable lengths, and may contain within them characters that also denote data type tags.
If anyone else is looking to grab work on this ticket, I think Error might be the next quickest option to grab!
kErrorfor Chrome: https://github.com/v8/v8/blob/master/src/objects/value-serializer.cc#L164-L166SCTAG_ERROR_OBJECTfor Firefox: https://searchfox.org/mozilla-central/source/js/src/vm/StructuredClone.cpp#148- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error