Changeset 288078 in webkit


Ignore:
Timestamp:
Jan 16, 2022 7:35:16 PM (2 years ago)
Author:
beidson@apple.com
Message:

database names leak cross-origin within the same browser session
https://bugs.webkit.org/show_bug.cgi?id=233548

Reviewed by Geoff Garen.

Source/WebCore:

Test: http/tests/security/getdatabases-crossorigin.html

  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::getAllDatabaseNamesAndVersions): When iterating the set of all open

UniqueIDBDatabases, only add them to the results list if their origins match.

  • page/ClientOrigin.h:

(WebCore::ClientOrigin::operator!= const):

LayoutTests:

  • http/tests/security/getdatabases-crossorigin-expected.txt: Added.
  • http/tests/security/getdatabases-crossorigin.html: Added.
  • http/tests/security/resources/getdatabases-otherframe.html: Added.
  • http/tests/security/resources/getdatabases-otherwindow.html: Added.
Location:
trunk
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r288073 r288078  
     12022-01-16  Brady Eidson  <beidson@apple.com>
     2
     3        database names leak cross-origin within the same browser session
     4        https://bugs.webkit.org/show_bug.cgi?id=233548
     5
     6        Reviewed by Geoff Garen.
     7
     8        * http/tests/security/getdatabases-crossorigin-expected.txt: Added.
     9        * http/tests/security/getdatabases-crossorigin.html: Added.
     10        * http/tests/security/resources/getdatabases-otherframe.html: Added.
     11        * http/tests/security/resources/getdatabases-otherwindow.html: Added.
     12
    1132022-01-16  Fujii Hironori  <Hironori.Fujii@sony.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r288077 r288078  
     12022-01-16  Brady Eidson  <beidson@apple.com>
     2
     3        database names leak cross-origin within the same browser session
     4        https://bugs.webkit.org/show_bug.cgi?id=233548
     5
     6        Reviewed by Geoff Garen.
     7
     8        Test: http/tests/security/getdatabases-crossorigin.html
     9
     10        * Modules/indexeddb/server/IDBServer.cpp:
     11        (WebCore::IDBServer::IDBServer::getAllDatabaseNamesAndVersions): When iterating the set of all open
     12          UniqueIDBDatabases, only add them to the results list if their origins match.
     13           
     14        * page/ClientOrigin.h:
     15        (WebCore::ClientOrigin::operator!= const):
     16
    1172022-01-16  Myles C. Maxfield  <mmaxfield@apple.com>
    218
  • trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp

    r280410 r288078  
    531531
    532532    for (auto& database : m_uniqueIDBDatabaseMap.values()) {
     533        if (database->identifier().origin() != origin)
     534            continue;
     535
    533536        auto path = database->filePath();
    534537        if (!path.isEmpty())
  • trunk/Source/WebCore/page/ClientOrigin.h

    r278253 r288078  
    3838    unsigned hash() const;
    3939    bool operator==(const ClientOrigin&) const;
     40    bool operator!=(const ClientOrigin& other) const { return !(*this == other); }
    4041
    4142    template<class Encoder> void encode(Encoder&) const;
Note: See TracChangeset for help on using the changeset viewer.