зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1346720 - Disallow invalid report IDs early on. r=gerald
MozReview-Commit-ID: GBDnzYh0gPt
This commit is contained in:
Родитель
658552e990
Коммит
9e93fd0d84
|
@ -249,6 +249,10 @@ let gDecoderDoctorHandler = {
|
||||||
// resolution of that issue, to be reported as telemetry.
|
// resolution of that issue, to be reported as telemetry.
|
||||||
let {type, isSolved, decoderDoctorReportId, formats} = parsedData;
|
let {type, isSolved, decoderDoctorReportId, formats} = parsedData;
|
||||||
type = type.toLowerCase();
|
type = type.toLowerCase();
|
||||||
|
// Error out early on invalid ReportId
|
||||||
|
if (!(/^\w+$/mi).test(decoderDoctorReportId)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
let title = gDecoderDoctorHandler.getLabelForNotificationBox(type);
|
let title = gDecoderDoctorHandler.getLabelForNotificationBox(type);
|
||||||
if (!title) {
|
if (!title) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -247,6 +247,7 @@ DecoderDoctorDocumentWatcher::EnsureTimerIsStarted()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Note: ReportStringIds are limited to alphanumeric only.
|
||||||
static const NotificationAndReportStringId sMediaWidevineNoWMF=
|
static const NotificationAndReportStringId sMediaWidevineNoWMF=
|
||||||
{ dom::DecoderDoctorNotificationType::Platform_decoder_not_found,
|
{ dom::DecoderDoctorNotificationType::Platform_decoder_not_found,
|
||||||
"MediaWidevineNoWMF" };
|
"MediaWidevineNoWMF" };
|
||||||
|
|
Загрузка…
Ссылка в новой задаче