Changeset 287608 in webkit
- Timestamp:
- Jan 5, 2022, 12:41:16 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 6 edited
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/workers/service/ServiceWorkerRegistrationKey.cpp (modified) (1 diff)
-
Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h (modified) (1 diff)
-
Source/WebCore/workers/service/server/RegistrationDatabase.cpp (modified) (1 diff)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (modified) (4 diffs)
-
Tools/TestWebKitAPI/Tests/WebCore/ServiceWorkerRoutines.cpp (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r287606 r287608 1 2022-01-05 Youenn Fablet <youenn@apple.com> 2 3 Tighten ServiceWorkerRegistrationKey::fromDatabaseKey 4 https://bugs.webkit.org/show_bug.cgi?id=234838 5 6 Reviewed by Chris Dumez. 7 8 Add missing input validation checks. 9 Covered by API test. 10 In addition, validate that the registration key matches the other database fields. 11 12 * workers/service/ServiceWorkerRegistrationKey.cpp: 13 * workers/service/ServiceWorkerRegistrationKey.h: 14 * workers/service/server/RegistrationDatabase.cpp: 15 (WebCore::RegistrationDatabase::importRecords): 16 1 17 2022-01-05 Martin Robinson <mrobinson@webkit.org> 2 18 -
trunk/Source/WebCore/workers/service/ServiceWorkerRegistrationKey.cpp
r281854 r287608 104 104 { 105 105 auto first = key.find(separatorCharacter, 0); 106 if (first == notFound) 107 return std::nullopt; 108 106 109 auto second = key.find(separatorCharacter, first + 1); 110 if (second == notFound) 111 return std::nullopt; 112 107 113 auto third = key.find(separatorCharacter, second + 1); 108 109 if (first == second || second == third) 114 if (third == notFound) 110 115 return std::nullopt; 111 116 -
trunk/Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h
r281854 r287608 61 61 62 62 String toDatabaseKey() const; 63 static std::optional<ServiceWorkerRegistrationKey> fromDatabaseKey(const String&);63 WEBCORE_EXPORT static std::optional<ServiceWorkerRegistrationKey> fromDatabaseKey(const String&); 64 64 65 65 #if !LOG_DISABLED -
trunk/Source/WebCore/workers/service/server/RegistrationDatabase.cpp
r286488 r287608 589 589 continue; 590 590 } 591 if (key->topOrigin() != *topOrigin) { 592 RELEASE_LOG_ERROR(ServiceWorker, "RegistrationDatabase::importRecords: Inconsistent registration"); 593 continue; 594 } 591 595 592 596 auto script = scriptStorage().retrieve(*key, scriptURL); -
trunk/Tools/ChangeLog
r287605 r287608 1 2022-01-05 Youenn Fablet <youenn@apple.com> 2 3 Tighten ServiceWorkerRegistrationKey::fromDatabaseKey 4 https://bugs.webkit.org/show_bug.cgi?id=234838 5 6 Reviewed by Chris Dumez. 7 8 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 9 * TestWebKitAPI/Tests/WebCore/ServiceWorkerRoutines.cpp: Added. 10 1 11 2022-01-05 Fujii Hironori <Hironori.Fujii@sony.com> 2 12 -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r287522 r287608 200 200 3FBD1B4A1D3D66AB00E6D6FA /* FullscreenLayoutConstraints.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 3FBD1B491D39D1DB00E6D6FA /* FullscreenLayoutConstraints.html */; }; 201 201 3FCC4FE81EC4E8CA0076E37C /* PictureInPictureDelegate.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 3FCC4FE61EC4E87E0076E37C /* PictureInPictureDelegate.html */; }; 202 4102EE1727845ED500D6BE74 /* ServiceWorkerRoutines.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4102EE1627845ED500D6BE74 /* ServiceWorkerRoutines.cpp */; }; 202 203 411223C726035FBF00B0A0B6 /* WebRTC.mm in Sources */ = {isa = PBXBuildFile; fileRef = 411223C626035FBE00B0A0B6 /* WebRTC.mm */; }; 203 204 41157237234B240C0050A1D1 /* GetUserMedia.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41157236234B24040050A1D1 /* GetUserMedia.mm */; }; … … 1925 1926 3FCC4FE41EC4E8520076E37C /* PictureInPictureDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PictureInPictureDelegate.mm; sourceTree = "<group>"; }; 1926 1927 3FCC4FE61EC4E87E0076E37C /* PictureInPictureDelegate.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = PictureInPictureDelegate.html; sourceTree = "<group>"; }; 1928 4102EE1627845ED500D6BE74 /* ServiceWorkerRoutines.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ServiceWorkerRoutines.cpp; sourceTree = "<group>"; }; 1927 1929 411223C626035FBE00B0A0B6 /* WebRTC.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebRTC.mm; sourceTree = "<group>"; }; 1928 1930 41157236234B24040050A1D1 /* GetUserMedia.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GetUserMedia.mm; sourceTree = "<group>"; }; … … 3743 3745 CDCFA7A91E45122F00C2433D /* SampleMap.cpp */, 3744 3746 CE06DF9A1E1851F200E570C9 /* SecurityOrigin.cpp */, 3747 4102EE1627845ED500D6BE74 /* ServiceWorkerRoutines.cpp */, 3745 3748 41973B5C1AF22875006C7B36 /* SharedBuffer.cpp */, 3746 3749 A17991891E1CA24100A505ED /* SharedBufferTest.cpp */, … … 5666 5669 9B4B5EA522DEBE19001E3D5A /* SelectionModifyByParagraphBoundary.mm in Sources */, 5667 5670 5769C50B1D9B0002000847FB /* SerializedCryptoKeyWrap.mm in Sources */, 5671 4102EE1727845ED500D6BE74 /* ServiceWorkerRoutines.cpp in Sources */, 5668 5672 7CCE7ECB1A411A7E00447C4C /* SetAndUpdateCacheModel.mm in Sources */, 5669 5673 7CCE7ECC1A411A7E00447C4C /* SetDocumentURI.mm in Sources */,
Note:
See TracChangeset
for help on using the changeset viewer.