抑制 Firefox/Firebug SHA-1 警告

Suppress Firefox/Firebug SHA-1 warning

我使用 Firebug 进行网络开发。从 Firefox 37 版本开始,我在控制台中看到以下烦人的消息:

This site makes use of a SHA-1 Certificate; it's recommended you use certificates with signature algorithms that use hash functions stronger than SHA-1"

我知道这是一条重要的信息,但它被重复了很多次,使我的工作几乎无法进行。 此外,每次我的页面与其他页面通信时它都会出现,例如 Google 分析和其他计数器。因此,如果我要更新我的证书,此消息仍会出现,因为这些站点将具有 SHA-1。 所以任何有 GA 的网站都会给我带来麻烦。

如何禁用或过滤此消息?

stated in the Firebug discussion group, Firebug's Console panel currently (Firebug 2.x) cannot filter single messages out. You can only filter by messages matching a specific text using the search field.

有像 issue #4507 这样的增强请求报告要添加这样的过滤器,尽管这不太可能在 Firebug 中直接实现,尤其是在版本 2.x 中。

Firebug 3 将集成到内置的 DevTools 中,它允许您通过取消选中 Security[=] 中的 Warnings 来过滤这些警告控制台面板中的 33=] 菜单:

除此之外,我创建了 bug 1170476 要求将消息减少到最少。

更新:

Firebug development is discontinued. Instead, there is a Firebug theme available within the Firefox DevTools starting from Firefox 48. Bug 1170476 is fixed since Firefox 42, so you will only see one message logged with a counter showing how often the message occurred.

你可以去掉这个消息,但是你必须修改firebugs代码。

抱歉忘记提及您需要先将 .xpi 转换为 .zip 并提取文件。完成后您可以保留文件夹原样,或将其压缩并再次将其转换为 xpi。您将需要重新启动 Firefox。

  1. 在您的 firefox 配置文件目录中找到插件并转到此文件“\extensions\firebug@software.joehewitt.com\content\firebug\console\errors.js”.
  2. 搜索 "logScriptError: function(context, object, isWarning)"。
  3. 代码后"var error = new ErrorMessageObj(object.errorMessage, object.sourceName, object.lineNumber, object.sourceLine, category, context, null);".

输入以下代码:

if(error.message.indexOf('SHA-1') != -1 || error.message.indexOf('Security Policy') != -1){
            return false;
        }

应该是第330行左右。

Select 控制台选项卡,按住键盘上的 Ctrl,单击 错误信息调试信息Cookies.

请记住,这将禁用 Firebug 中记录的所有警告的输出,而不仅仅是 googleapis 生成的警告。

从 URL 中删除 HTTPS 或将所有资源保留在本地。