Title: [263016] trunk/Source/WebKit
- Revision
- 263016
- Author
- [email protected]
- Date
- 2020-06-14 17:58:43 -0700 (Sun, 14 Jun 2020)
Log Message
[IPC hardening] Return type of -[NSCoder validateClassSupportsSecureCoding:] is incorrect
<https://webkit.org/b/213161>
<rdar://problem/64050085>
Reviewed by Darin Adler.
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(validateClass):
- Fix return type of
-[NSCoder validateClassSupportsSecureCoding:]. Throw an
NSException in case the method ever returns NO without
throwing its own NSException. (Currently this method does
throw an NSException instead of returning NO.)
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (263015 => 263016)
--- trunk/Source/WebKit/ChangeLog 2020-06-14 23:45:05 UTC (rev 263015)
+++ trunk/Source/WebKit/ChangeLog 2020-06-15 00:58:43 UTC (rev 263016)
@@ -1,3 +1,19 @@
+2020-06-14 David Kilzer <[email protected]>
+
+ [IPC hardening] Return type of -[NSCoder validateClassSupportsSecureCoding:] is incorrect
+ <https://webkit.org/b/213161>
+ <rdar://problem/64050085>
+
+ Reviewed by Darin Adler.
+
+ * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
+ (validateClass):
+ - Fix return type of
+ -[NSCoder validateClassSupportsSecureCoding:]. Throw an
+ NSException in case the method ever returns NO without
+ throwing its own NSException. (Currently this method does
+ throw an NSException instead of returning NO.)
+
2020-06-14 Carlos Garcia Campos <[email protected]>
[SOUP] Disable HSTS for requests when cookies will be blocked by ITP
Modified: trunk/Source/WebKit/Shared/API/Cocoa/WKRemoteObjectCoder.mm (263015 => 263016)
--- trunk/Source/WebKit/Shared/API/Cocoa/WKRemoteObjectCoder.mm 2020-06-14 23:45:05 UTC (rev 263015)
+++ trunk/Source/WebKit/Shared/API/Cocoa/WKRemoteObjectCoder.mm 2020-06-15 00:58:43 UTC (rev 263016)
@@ -53,7 +53,7 @@
@end
@interface NSCoder ()
-- (void)validateClassSupportsSecureCoding:(Class)objectClass;
+- (BOOL)validateClassSupportsSecureCoding:(Class)objectClass;
@end
@implementation WKRemoteObjectEncoder {
@@ -638,7 +638,8 @@
if (objectClass == [NSInvocation class] || objectClass == [NSBlockInvocation class])
return;
- [decoder validateClassSupportsSecureCoding:objectClass];
+ if (![decoder validateClassSupportsSecureCoding:objectClass])
+ [NSException raise:NSInvalidUnarchiveOperationException format:@"Object of class \"%@\" does not support NSSecureCoding.", objectClass];
}
static void decodeInvocationArguments(WKRemoteObjectDecoder *decoder, NSInvocation *invocation, const Vector<HashSet<CFTypeRef>>& allowedArgumentClasses, NSUInteger firstArgument)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes