Esempio n. 1
0
bool SecurityOrigin::canAccessFeatureRequiringSecureOrigin(String& errorMessage) const
{
    ASSERT(m_protocol != "data");
    if (SchemeRegistry::shouldTreatURLSchemeAsSecure(m_protocol) || isLocal() || isLocalhost())
        return true;

    errorMessage = "Only secure origins are allowed. http://goo.gl/lq4gCo";
    return false;
}
bool SecurityOrigin::isPotentiallyTrustworthy() const
{
    ASSERT(m_protocol != "data");
    if (SchemeRegistry::shouldTreatURLSchemeAsSecure(m_protocol) || isLocal() || isLocalhost())
        return true;

    if (SecurityPolicy::isOriginWhiteListedTrustworthy(*this))
        return true;

    return false;
}
Esempio n. 3
0
bool SecurityOrigin::isPotentiallyTrustworthy(String& errorMessage) const
{
    ASSERT(m_protocol != "data");
    if (SchemeRegistry::shouldTreatURLSchemeAsSecure(m_protocol) || isLocal() || isLocalhost())
        return true;

    if (SecurityPolicy::isOriginWhiteListedTrustworthy(*this))
        return true;

    errorMessage = "Only secure origins are allowed (see: https://goo.gl/Y0ZkNV).";
    return false;
}