Changeset 197858 in webkit


Ignore:
Timestamp:
Mar 9, 2016 9:06:56 AM (8 years ago)
Author:
Brent Fulgham
Message:

Local HTML should be blocked from localStorage access unless "Disable Local File Restrictions" is checked..
https://bugs.webkit.org/show_bug.cgi?id=155185
<rdar://problem/11101440>

Reviewed by Zalan Bujtas.

Source/WebCore:

Tested by storage/domstorage/localstorage/blocked-file-access.html.

  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::canAccessStorage): If the origin is a local file, and we have not been granted
universal file access, prevent access to DOM localStorage.

LayoutTests:

  • storage/domstorage/localstorage/blocked-file-access-expected.txt: Added.
  • storage/domstorage/localstorage/blocked-file-access.html: Added.
  • storage/domstorage/localstorage/resources/blocked-example.html: Added.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r197857 r197858  
     12016-03-08  Brent Fulgham  <bfulgham@apple.com>
     2
     3        Local HTML should be blocked from localStorage access unless "Disable Local File Restrictions" is checked..
     4        https://bugs.webkit.org/show_bug.cgi?id=155185
     5        <rdar://problem/11101440>
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        * storage/domstorage/localstorage/blocked-file-access-expected.txt: Added.
     10        * storage/domstorage/localstorage/blocked-file-access.html: Added.
     11        * storage/domstorage/localstorage/resources/blocked-example.html: Added.
     12
    1132016-03-09  Manuel Rego Casasnovas  <rego@igalia.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r197857 r197858  
     12016-03-08  Brent Fulgham  <bfulgham@apple.com>
     2
     3        Local HTML should be blocked from localStorage access unless "Disable Local File Restrictions" is checked..
     4        https://bugs.webkit.org/show_bug.cgi?id=155185
     5        <rdar://problem/11101440>
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        Tested by storage/domstorage/localstorage/blocked-file-access.html.
     10
     11        * page/SecurityOrigin.cpp:
     12        (WebCore::SecurityOrigin::canAccessStorage): If the origin is a local file, and we have not been granted
     13        universal file access, prevent access to DOM localStorage.
     14
    1152016-03-09  Manuel Rego Casasnovas  <rego@igalia.com>
    216
  • trunk/Source/WebCore/page/SecurityOrigin.cpp

    r197706 r197858  
    376376        return false;
    377377
     378    if (isLocal() && !m_universalAccess)
     379        return false;
     380
    378381    // FIXME: This check should be replaced with an ASSERT once we can guarantee that topOrigin is not null.
    379382    if (!topOrigin)
Note: See TracChangeset for help on using the changeset viewer.