如何准确判断哪些不安全项目导致浏览器对混合安全和不安全项目发出警告?

发布于 2024-09-26 21:08:09 字数 626 浏览 3 评论 0原文

在 Firefox 中,我查看我的网站,但没有收到有关不安全混合内容的警告。

使用 FireBug,我可以看到每个请求都是 https

在 Chrome 中,我在地址栏中将 https 划掉了。

Chrome 的地址栏

Chrome 的地址 栏error

我在 Chrome 中查看了源代码,然后运行了这个正则表达式 /http(?!s)/ 但它发现的唯一内容是一些外部链接的 href 属性和文档类型和 http-equiv 元标记。

使用 Chrome 的资源跟踪显示所有请求也都是 https

这包括 Google Analytics、来自 Google CDN 的 jQuery 和 Facebook 之类的脚本。

是否有任何特定工具可以用来显示非 https 请求,或者我可以进一步尝试什么?

In Firefox, I view my site and get no warnings about insecure mixed content.

Using FireBug, I can see that every request is https.

In Chrome, I get the https crossed out in the address bar.

Chrome's address bar

Chrome's error

I viewed source in Chrome and then ran this regex /http(?!s)/ but the only things it found were the href attributes for some external links and the doc type and http-equiv meta tags.

Using Chrome's Resource Tracking revealed all requests were https too.

This includes Google Analytics, jQuery from Google's CDN and Facebook like scripts.

Is there any specific tool I can use to show non https requests, or anything further I can try?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(10

娇纵 2024-10-03 21:08:09

我发现,即使在没有混合内容的情况下,如果在会话期间域中已经遇到混合内容,我也会在 Chrome 中收到“混合内容”警告。

(这里还提到:为什么 Chrome 会报告安全/不安全警告,而其他浏览器却没有报告安全/不安全警告?

I found that I get the "mixed content"-warning in Chrome even when there is no mixed content, if sometime during the session mixed content was already encountered on the domain.

(Also mentioned here: Why is Chrome reporting a secure / non secure warning when no other browsers aren't?)

多情癖 2024-10-03 21:08:09

在 Chrome 的开发者工具中,“控制台”选项卡显示不会加载的资源,因为它们不安全。

In Chrome's Developer Tools, the Console tab shows the resources that it won't load because they unsecure.

戈亓 2024-10-03 21:08:09

您可以将“方案”列添加到 Chrome 开发人员工具网络选项卡,以显示通过 http 或 https 发送的请求:

  1. 按 F12 显示开发人员工具
  2. 切换到网络选项卡
  3. 右键单击​​列标题并选择“方案”
  4. 重新加载显示通过 http 或 https 加载哪些元素的页面

Chrome 开发人员工具,方案列

You can add the "scheme" column to the Chrome developer tools network tab to show which requests were sent over http or https:

  1. Press F12 to show the developer tools
  2. Switch to the Network tab
  3. Right click in the column headers and select "Scheme"
  4. Reload the page to show which elements are loaded over http or https

Chrome developer tools, scheme column

何以畏孤独 2024-10-03 21:08:09

在 Chrome 的 48 版本中,他们添加了 安全面板。使用它您可以快速识别混合内容资源:

在此处输入图像描述

In 48-th version of chrome they added a security panel. Using it you can quickly identify the mixed content resources:

enter image description here

不语却知心 2024-10-03 21:08:09

在这种情况下,准确查看使用哪个协议来加载资源很有帮助,我建议使用 Fiddler2 作为与浏览器无关的解决方案,可以准确地向您显示每个请求上发生的流量。

从网站:

Fiddler 是一个 Web 调试代理,它记录您的计算机和 Internet 之间的所有 HTTP(S) 流量。 Fiddler 允许您检查所有 HTTP(S) 流量、设置断点以及“摆弄”传入或传出数据。 Fiddler 包含一个强大的基于事件的脚本子系统,并且可以使用任何 .NET 语言进行扩展。

编辑:浏览器内调试工具变得非常好,因此这个第三方工具可能不如第一次编写此答案时那么有用。

In situations like this where it's helpful to see exactly which protocol is being used to load resources, I would recommend Fiddler2 as a browser-agnostic solution that can show you exactly what traffic is occurring on each request.

From the site:

Fiddler is a Web Debugging Proxy which logs all HTTP(S) traffic between your computer and the Internet. Fiddler allows you to inspect all HTTP(S) traffic, set breakpoints, and "fiddle" with incoming or outgoing data. Fiddler includes a powerful event-based scripting subsystem, and can be extended using any .NET language.

Edit: In-browser debugging tools are becoming really good so this third-party tool may not be as useful as it was when this answer was first written.

晌融 2024-10-03 21:08:09

打开 Web 检查器并找到右上角的黄色三角形(警告)。单击它,它将显示所有安全问题。

Open up the Web Inspector and find the yellow triangle (warning) in the top right. Click on it and it will display all security issues.

凉薄对峙 2024-10-03 21:08:09

你有 FireFox 的 HttpFox 插件吗?我认为那会起作用。
除此之外,它还报告网页请求的所有资产的 URL、方法、结果代码和字节。这是我用来捕获偶尔的非 HTTPS 图形等的方法。我确信其他建议的工具也会做同样的事情......

Do you have the HttpFox plugin for FireFox? That'd work, I think.
Among other things, it reports on the URL, Method, Result Code, and bytes of all the assets that a web page requests. It's what I've used to trap the occasional non-HTTPS graphic, etc. I'm sure the other suggested tools would do the same...

山田美奈子 2024-10-03 21:08:09

您可以使用 SslCheck

这是一个免费的在线工具,可以递归地抓取网站(跟踪所有内部链接)并扫描不安全的内容包括 - 图像、脚本和 CSS。

(免责声明:我是开发者之一)

You can use SslCheck

It's a free online tool that crawls a website recursively (following all internal links) and scans for nonsecure includes - images, scripts and CSS.

(disclaimer: I'm one of the developers)

心清如水 2024-10-03 21:08:09

我知道这篇文章很旧,但我遇到了它并遇到了同样的问题。我点击了 Chrome 菜单(右上角),向下滚动到“工具”>“并选择开发人员工具。单击“控制台”选项卡,它准确地告诉我问题是什么...图标是通过 http 而不是 https 提供的,但当然它不在页面源代码中。更正了我的 CMS 中的问题,该问题加载了页面中没有代码的图标...并且不再出现错误!

I know this post is old, but I ran across it and had the same issue. I clicked on the Chrome menu (top right corner), scrolled down to Tools> and selected Developer Tools. Clicked on the Console tab and it told me exactly what the problem was... the favicon was served over http, not https, but of course it was not in the page source code. Corrected the problem in my CMS, which loads the favicon without code in the page... and no more error!

你是暖光i 2024-10-03 21:08:09

请注意,“混合内容”和“混合脚本”是单独检测的。检查此网站以了解 Chrome 中图标的含义:https:// /support.google.com/chromebook/answer/95617?p=ui_security_indicator&rd=1(点击“查看详细信息”链接)。

灰色图标 = 混合内容,红色图标 = 混合脚本。

Note that 'mixed content' and 'mixed scripting' are detected seperatly. Check this site for the meaning of the icons in Chrome: https://support.google.com/chromebook/answer/95617?p=ui_security_indicator&rd=1 (click 'see details' link).

Grey icon = mixed content, red icon = mixed scripting.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文