Changeset 199900 in webkit


Ignore:
Timestamp:
Apr 22, 2016 1:57:26 PM (8 years ago)
Author:
Brent Fulgham
Message:

Anchor element 'ping' property should only apply to http/https destinations
https://bugs.webkit.org/show_bug.cgi?id=156801
<rdar://problem/25834419>

Reviewed by Chris Dumez.

Take advantage of the hyperlink auditing language "UAs may either ignore the
ping attribute altogether, or selectively ignore URLs in the list (e.g. ignoring
any third-party URLs)" to restrict pings to http/https targets. For details, see
<https://html.spec.whatwg.org/multipage/semantics.html#hyperlink-auditing>.

Tested by http/tests/navigation/ping-attribute tests.

  • loader/PingLoader.cpp:

(WebCore::PingLoader::sendPing): Ignore requests to ping anything outside the
family of HTTP protocols (http/https).

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r199896 r199900  
     12016-04-22  Brent Fulgham  <bfulgham@apple.com>
     2
     3        Anchor element 'ping' property should only apply to http/https destinations
     4        https://bugs.webkit.org/show_bug.cgi?id=156801
     5        <rdar://problem/25834419>
     6
     7        Reviewed by Chris Dumez.
     8
     9        Take advantage of the hyperlink auditing language "UAs may either ignore the
     10        ping attribute altogether, or selectively ignore URLs in the list (e.g. ignoring
     11        any third-party URLs)" to restrict pings to http/https targets. For details, see
     12        <https://html.spec.whatwg.org/multipage/semantics.html#hyperlink-auditing>.
     13
     14        Tested by http/tests/navigation/ping-attribute tests.
     15
     16        * loader/PingLoader.cpp:
     17        (WebCore::PingLoader::sendPing): Ignore requests to ping anything outside the
     18        family of HTTP protocols (http/https).
     19
    1202016-04-22  Ryan Haddad  <ryanhaddad@apple.com>
    221
  • trunk/Source/WebCore/loader/PingLoader.cpp

    r198180 r199900  
    9393void PingLoader::sendPing(Frame& frame, const URL& pingURL, const URL& destinationURL)
    9494{
     95    if (!pingURL.protocolIsInHTTPFamily())
     96        return;
     97
    9598    ResourceRequest request(pingURL);
    9699   
Note: See TracChangeset for help on using the changeset viewer.