Changeset 59528 in webkit


Ignore:
Timestamp:
May 15, 2010 2:10:44 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-05-15 Adam Barth <abarth@webkit.org>

Reviewed by Darin Adler.

Show a console message when X-Frame-Options blocks a load
https://bugs.webkit.org/show_bug.cgi?id=39087

Update expected results to show the console message.

  • http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-expected.txt:
  • http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body-expected.txt:
  • http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny-expected.txt:

2010-05-15 Adam Barth <abarth@webkit.org>

Reviewed by Darin Adler.

Show a console message when X-Frame-Options blocks a load
https://bugs.webkit.org/show_bug.cgi?id=39087

The blank page confuses people when X-Frame-Options blocks a load. The
console message should at least give them a hint as to what's going on.

  • dom/Document.cpp: (WebCore::Document::processHttpEquiv):
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r59517 r59528  
     12010-05-15  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        Show a console message when X-Frame-Options blocks a load
     6        https://bugs.webkit.org/show_bug.cgi?id=39087
     7
     8        Update expected results to show the console message.
     9
     10        * http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-expected.txt:
     11        * http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body-expected.txt:
     12        * http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny-expected.txt:
     13
    1142010-05-14  Adam Barth  <abarth@webkit.org>
    215
  • trunk/LayoutTests/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-expected.txt

    r46809 r59528  
    33http://127.0.0.1:8000/security/XFrameOptions/resources/x-frame-options-deny-meta-tag-subframe.html - didReceiveResponse <NSURLResponse http://127.0.0.1:8000/security/XFrameOptions/resources/x-frame-options-deny-meta-tag-subframe.html, http status code 200>
    44http://127.0.0.1:8000/security/XFrameOptions/resources/x-frame-options-deny-meta-tag-subframe.html - didFailLoadingWithError: <NSError domain NSURLErrorDomain, code -999, failing URL "http://127.0.0.1:8000/security/XFrameOptions/resources/x-frame-options-deny-meta-tag-subframe.html">
     5CONSOLE MESSAGE: line 1: Refused to display document because display forbidden by X-Frame-Options.
     6
    57about:blank - willSendRequest <NSURLRequest URL about:blank, main document URL http://127.0.0.1:8000/security/XFrameOptions/x-frame-options-deny-meta-tag.html, http method GET> redirectResponse (null)
    68about:blank - didReceiveResponse <NSURLResponse about:blank, http status code 0>
  • trunk/LayoutTests/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body-expected.txt

    r46809 r59528  
    33http://127.0.0.1:8000/security/XFrameOptions/resources/x-frame-options-deny-meta-tag-subframe-in-body.html - didReceiveResponse <NSURLResponse http://127.0.0.1:8000/security/XFrameOptions/resources/x-frame-options-deny-meta-tag-subframe-in-body.html, http status code 200>
    44http://127.0.0.1:8000/security/XFrameOptions/resources/x-frame-options-deny-meta-tag-subframe-in-body.html - didFailLoadingWithError: <NSError domain NSURLErrorDomain, code -999, failing URL "http://127.0.0.1:8000/security/XFrameOptions/resources/x-frame-options-deny-meta-tag-subframe-in-body.html">
     5CONSOLE MESSAGE: line 1: Refused to display document because display forbidden by X-Frame-Options.
     6
    57about:blank - willSendRequest <NSURLRequest URL about:blank, main document URL http://127.0.0.1:8000/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body.html, http method GET> redirectResponse (null)
    68about:blank - didReceiveResponse <NSURLResponse about:blank, http status code 0>
  • trunk/LayoutTests/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny-expected.txt

    r46809 r59528  
    33http://localhost:8000/security/XFrameOptions/resources/x-frame-options-deny-meta-tag-subframe-parent-same-origin-deny.html - didReceiveResponse <NSURLResponse http://localhost:8000/security/XFrameOptions/resources/x-frame-options-deny-meta-tag-subframe-parent-same-origin-deny.html, http status code 200>
    44http://localhost:8000/security/XFrameOptions/resources/x-frame-options-deny-meta-tag-subframe-parent-same-origin-deny.html - didFailLoadingWithError: <NSError domain NSURLErrorDomain, code -999, failing URL "http://localhost:8000/security/XFrameOptions/resources/x-frame-options-deny-meta-tag-subframe-parent-same-origin-deny.html">
     5CONSOLE MESSAGE: line 1: Refused to display document because display forbidden by X-Frame-Options.
     6
    57about:blank - willSendRequest <NSURLRequest URL about:blank, main document URL http://127.0.0.1:8000/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny.html, http method GET> redirectResponse (null)
    68about:blank - didReceiveResponse <NSURLResponse about:blank, http status code 0>
  • trunk/WebCore/ChangeLog

    r59526 r59528  
     12010-05-15  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        Show a console message when X-Frame-Options blocks a load
     6        https://bugs.webkit.org/show_bug.cgi?id=39087
     7
     8        The blank page confuses people when X-Frame-Options blocks a load.  The
     9        console message should at least give them a hint as to what's going on.
     10
     11        * dom/Document.cpp:
     12        (WebCore::Document::processHttpEquiv):
     13
    1142010-05-15  Ilya Tikhonovsky  <loislo@chromium.org>
    215
  • trunk/WebCore/dom/Document.cpp

    r59486 r59528  
    23092309            frameLoader->stopAllLoaders();
    23102310            frame->redirectScheduler()->scheduleLocationChange(blankURL(), String());
     2311
     2312            DEFINE_STATIC_LOCAL(String, consoleMessage, ("Refused to display document because display forbidden by X-Frame-Options.\n"));
     2313            frame->domWindow()->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, consoleMessage, 1, String());
    23112314        }
    23122315    }
Note: See TracChangeset for help on using the changeset viewer.