Changeset 226248 in webkit
- Timestamp:
- Dec 21, 2017 3:57:56 PM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r226246 r226248 1 2017-12-21 Brent Fulgham <bfulgham@apple.com> 2 3 Unreviewed test fix after r226224. 4 <rdar://problem/36185975> 5 6 Pasteboard data is more than a dictionary. We have to whitelist NSString 7 and NSArray as well. Change method name to reflect that we take a whitelist 8 of classes that are allowed to be unarchived in the call. 9 10 * platform/ios/PlatformPasteboardIOS.mm: 11 (WebCore::PlatformPasteboard::write): Use revised method. 12 (WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const): Ditto. 13 1 14 2017-12-21 Zalan Bujtas <zalan@apple.com> 2 15 -
trunk/Source/WebCore/PAL/ChangeLog
r226239 r226248 1 2017-12-21 Brent Fulgham <bfulgham@apple.com> 2 3 Unreviewed test fix after r226224. 4 <rdar://problem/36185975> 5 6 Pasteboard data is more than a dictionary. We have to whitelist NSString 7 and NSArray as well. Change method name to reflect that we take a whitelist 8 of classes that are allowed to be unarchived in the call. 9 10 * pal/spi/cocoa/NSKeyedArchiverSPI.h: 11 (unarchivedObjectOfClassesFromData): 12 (unarchivedObjectOfClassFromData): Deleted. 13 1 14 2017-12-21 Jeremy Jones <jeremyj@apple.com> 2 15 -
trunk/Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h
r226224 r226248 93 93 } 94 94 95 inline id _Nullable unarchivedObjectOfClass FromData(Class _Nonnull cls, NSData * _Nonnull data)95 inline id _Nullable unarchivedObjectOfClassesFromData(NSSet<Class> * _Nonnull classes, NSData * _Nonnull data) 96 96 { 97 97 #if USE(SECURE_ARCHIVER_API) 98 98 #if !USE(SECURE_ARCHIVER_FOR_ATTRIBUTED_STRING) 99 99 // Remove this code when the fix from <rdar://problem/31376830> is deployed to all relevant build targets. 100 if ( cls == [NSAttributedString class])100 if ([classes containsObject:[NSAttributedString class]]) 101 101 return insecurelyUnarchiveObjectFromData(data); 102 102 #endif 103 103 NSError *error; 104 id value = [NSKeyedUnarchiver unarchivedObjectOfClass :cls fromData:data error:&error];104 id value = [NSKeyedUnarchiver unarchivedObjectOfClasses:classes fromData:data error:&error]; 105 105 if (!value) 106 106 LOG_ERROR("Unable to unarchive data: %@", error); 107 107 return value; 108 108 #else 109 UNUSED_PARAM(cl s);109 UNUSED_PARAM(classes); 110 110 return insecurelyUnarchiveObjectFromData(data); 111 111 #endif -
trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm
r226224 r226248 266 266 267 267 if (content.dataInAttributedStringFormat) { 268 NSAttributedString *attributedString = unarchivedObjectOfClass FromData([NSAttributedString class], content.dataInAttributedStringFormat->createNSData().get());268 NSAttributedString *attributedString = unarchivedObjectOfClassesFromData([NSSet setWithObject:[NSAttributedString class]], content.dataInAttributedStringFormat->createNSData().get()); 269 269 if (attributedString) 270 270 [representationsToRegister addRepresentingObject:attributedString]; … … 381 381 continue; 382 382 383 NSDictionary *teamDataObject = unarchivedObjectOfClass FromData([NSDictionary class], provider.teamData);383 NSDictionary *teamDataObject = unarchivedObjectOfClassesFromData([NSSet setWithObjects:[NSDictionary class], [NSString class], [NSArray class], nil], provider.teamData); 384 384 if (!teamDataObject) 385 385 continue;
Note: See TracChangeset
for help on using the changeset viewer.