由hasPasswordField_引发的Facebook iFrame安全错误(document.domain) [英] Facebook iFrame security error (document.domain) raised by hasPasswordField_

查看:185
本文介绍了由hasPasswordField_引发的Facebook iFrame安全错误(document.domain)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个使用标准Facebook API的项目,主要用于登录和注册目的。
由于我们使用Sentry来接收错误通知,因此经常会出现以下内容(在主页中):

  SecurityError:阻止来源https://www.mywebsite.com的框架访问源自https://www.facebook.com的
框架。访问
的框架将document.domain设置为facebook.com,但请求访问的框没有。
两者都必须将document.domain设置为相同的值以允许访问。 $ / $ b在hasPasswordField_(/ en:1:368)
在hasPasswordField_(/ en:1:499)
在findPasswordForms(/ en:1:173)
全局代码/ en:10:27)

这很奇怪,因为方法

  hasPasswordField_ / findPasswordForms 

不要存在于项目代码中。



因为错误只出现在


iOS Chrome Mobile,版本:59.0.3071 | 60.0.3112 b $ b

有一个Chrome内部组件试图访问Facebook iFrame或Facebook正在搜索一些密码字段该网页?

更新:
在进一步搜索后,我在Sentry GIT页面上找到了这篇文章:
< a href =https://github.com/getsentry/sentry/issues/5267 =nofollow noreferrer> https://github.com/getsentry/sentry/issues/5267
他们建议简单地忽略错误。



任何想法如何面对它不同?
任何帮助将不胜感激!

解决方案

它在这里说这个bug已经在版本61中修复了。


We have a project that use standard Facebook API used mainly for login and registration purpose. Since we use Sentry to receive error notification, the following one (in home page) occurs often:

SecurityError: Blocked a frame with origin "https://www.mywebsite.com" from accessing a 
frame with origin "https://www.facebook.com". The frame being 
accessed set "document.domain" to "facebook.com", but the frame requesting access did not. 
Both must set "document.domain" to the same value to allow access.
at hasPasswordField_ (/en:1:368)
at hasPasswordField_ (/en:1:499)
at findPasswordForms (/en:1:173)
at global code (/en:10:27)

It's strange because the methods

 hasPasswordField_ / findPasswordForms

don't exist on the project code.

Because the error currently occurs only on

iOS Chrome Mobile, version: 59.0.3071 | 60.0.3112

There is a Chrome internal component that is trying to access to the Facebook iFrame or is Facebook searching for some password fields on the webpage?

UPDATE: After a further search, I found this post on Sentry GIT page: https://github.com/getsentry/sentry/issues/5267 they suggest simply to ignore the error.

Any idea how to face it differently? Any help will be appreciated!

解决方案

It says here that the bug has been fixed in version 61. https://crbug.com/709132

这篇关于由hasPasswordField_引发的Facebook iFrame安全错误(document.domain)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆