Commit fe5fa97d authored by jschuh@chromium.org's avatar jschuh@chromium.org

2010-07-22 Justin Schuh <jschuh@chromium.org>

        Reviewed by Adam Barth.

        Make history state methods validate against document URL
        https://bugs.webkit.org/show_bug.cgi?id=42858

        Test: fast/history/history-replace-illegal.html

        * page/History.cpp:
        (WebCore::History::urlForState):
2010-07-22  Justin Schuh  <jschuh@chromium.org>

        Reviewed by Adam Barth.

        Make history state methods validate against document URL
        https://bugs.webkit.org/show_bug.cgi?id=42858

        * fast/history/history-replace-illegal-expected.txt: Added.
        * fast/history/history-replace-illegal.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63925 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d26119e7
2010-07-22 Justin Schuh <jschuh@chromium.org>
Reviewed by Adam Barth.
Make history state methods validate against document URL
https://bugs.webkit.org/show_bug.cgi?id=42858
* fast/history/history-replace-illegal-expected.txt: Added.
* fast/history/history-replace-illegal.html: Added.
2010-07-22 Yury Semikhatsky <yurys@chromium.org>
Reviewed by Joseph Pecoraro.
CONSOLE MESSAGE: line 9: SECURITY_ERR: DOM Exception 18: An attempt was made to break through the security policy of the user agent.
This page should trigger an error on attempting to set the URL bar to https://www.test.com/
<html>
<head>
<base href="https://www.test.com/">
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
window.onload = function(){
window.history.replaceState({}, {}, 'https://www.test.com/');
};
</script>
</head>
<body>
This page should trigger an error on attempting to set the URL bar to https://www.test.com/
</body>
</html>
\ No newline at end of file
2010-07-22 Justin Schuh <jschuh@chromium.org>
Reviewed by Adam Barth.
Make history state methods validate against document URL
https://bugs.webkit.org/show_bug.cgi?id=42858
Test: fast/history/history-replace-illegal.html
* page/History.cpp:
(WebCore::History::urlForState):
2010-07-22 Andy Estes <aestes@apple.com>
Reviewed by Maciej Stachowiak.
......@@ -82,7 +82,7 @@ void History::go(int distance)
KURL History::urlForState(const String& urlString)
{
KURL baseURL = m_frame->loader()->baseURL();
KURL baseURL = m_frame->document()->url();
if (urlString.isEmpty())
return baseURL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment