URLs are not stripped from markers using MS::Format::Url
If a new marker type is added, using Url format, e.g. schema.AddKeyFormat("url", MS::Format::Url); the expectation is that the Url would be stripped on profile upload if the user did not want to share URLs.
A sample patch that demonstrates the issue: https://d2mfgivbiy2fiw.cloudfront.net/file/data/erc7qrzdy7u2744sqyvr/PHID-FILE-6swpjsvyhachgkko5fvq/D149992.diff
And the marker definition:
struct UrlMarker {
static constexpr Span<const char> MarkerTypeName() {
return MakeStringSpan("url");
}
static void StreamJSONMarkerData(
mozilla::baseprofiler::SpliceableJSONWriter& aWriter,
const mozilla::ProfilerString8View& aURL) {
if (aURL.Length() != 0) {
aWriter.StringProperty("url", aURL);
}
}
static MarkerSchema MarkerTypeDisplay() {
using MS = MarkerSchema;
MS schema(MS::Location::MarkerChart, MS::Location::MarkerTable);
schema.SetTableLabel("{marker.name} - {marker.data.url}");
schema.AddKeyFormat("url", MS::Format::Url);
return schema;
}
};
Possibly the same as https://github.com/firefox-devtools/profiler/issues/2757
This profile has been produced with the mentioned patch, and will make it easier to test a patch: https://share.firefox.dev/3boTb9P
Just pinging on this one. We would like to land the marker that records speculative connections, but my understanding is that I can't until this bug is fixed because of the url leakage.
Thanks for the ping Andrew, it wasn't clear to me you were blocked on this. We can look at this soon, hopefully that shouldn't be too hard.
Thank you!