[Webkit-unassigned] [Bug 183028] New: pushState and replaceState no longer works in local file

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 21 22:24:05 PST 2018


https://bugs.webkit.org/show_bug.cgi?id=183028

            Bug ID: 183028
           Summary: pushState and replaceState no longer works in local
                    file
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Unspecified
                OS: iOS 11
            Status: NEW
          Severity: Major
          Priority: P1
         Component: History
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: danyao at chromium.org
                CC: achristensen at apple.com, dbates at webkit.org

Created attachment 334441

  --> https://bugs.webkit.org/attachment.cgi?id=334441&action=review

replace_state.html

pushState and replaceState when called in file:// scheme fail in Safari Tech Review and iOS 11.3 with SecurityError: Blocked attempt to use history.replaceState() to change session history URL from file:///tmp/replace_state.html to file:///tmp/replace_state.html?replaced. Paths and fragments must match for a sandboxed document.

How to reproduce: load the attached file using file:// scheme.

This is a regression compared to Safari 11. I believe it's a result of this change: https://github.com/WebKit/webkit/commit/f7e07f31530f7c4df8bbf3a60697518428acd8da#diff-c870f5a610f9e6d344005bf329ccc405

Chrome on iOS depends on this behavior to restore session history into WKWebView after app is backgrounded.
There is also web compatibility concern, see http://crbug.com/528681. Blink ended up shipping a patch that considers two file:// scheme URLs same origin if they only differ in query and fragment: https://codereview.chromium.org/1632513002

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180222/ac7ddda7/attachment.html>


More information about the webkit-unassigned mailing list