Bug 415656: Ignore non-http(s) urls for the crash reports server. r=gavin, a1.9b3=beltzner

This commit is contained in:
dtownsend@oxymoronical.com 2008-02-04 15:22:53 -08:00
Родитель 6bc372de6d
Коммит b6c3aaf3e4
1 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -85,10 +85,15 @@ function populateReportList() {
var prefService = Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefBranch);
var reportURL = null;
try {
var reportURL = prefService.getCharPref("breakpad.reportURL");
reportURL = prefService.getCharPref("breakpad.reportURL");
// Ignore any non http/https urls
if (!/^https?:/i.test(reportURL))
reportURL = null;
}
catch (e) {
catch (e) { }
if (!reportURL) {
document.getElementById("reportList").style.display = "none";
document.getElementById("noConfig").style.display = "block";
return;