Bug 223168

Summary: Add internal additions for WebAuthn compatibility
Product: WebKit Reporter: Kate Cheney <katherine_cheney>
Component: WebKit Misc.Assignee: Kate Cheney <katherine_cheney>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, cdumez, ews-watchlist, jiewen_tan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description Kate Cheney 2021-03-14 16:21:19 PDT
com.apple.webkit.webauthn should actually be com.apple.WebKit.WebAuthn for internal-compatibility reasons.
Comment 1 Kate Cheney 2021-03-14 16:21:46 PDT
<rdar://problem/74890060>
Comment 2 Kate Cheney 2021-03-14 16:25:14 PDT
Created attachment 423137 [details]
Patch
Comment 3 Brent Fulgham 2021-03-15 09:47:58 PDT
Comment on attachment 423137 [details]
Patch

Case sensitivity. *sigh*. r=me
Comment 4 Jiewen Tan 2021-03-15 12:36:41 PDT
Comment on attachment 423137 [details]
Patch

Can we just add the WKA part and remove the entitlement part?
Comment 5 Kate Cheney 2021-03-15 12:48:58 PDT
Created attachment 423224 [details]
Patch
Comment 6 Kate Cheney 2021-03-15 12:49:13 PDT
(In reply to Jiewen Tan from comment #4)
> Comment on attachment 423137 [details]
> Patch
> 
> Can we just add the WKA part and remove the entitlement part?

Yes, I updated the patch.
Comment 7 Jiewen Tan 2021-03-15 13:14:52 PDT
Comment on attachment 423224 [details]
Patch

LGTM.
Comment 8 Kate Cheney 2021-03-15 15:42:00 PDT
Created attachment 423255 [details]
Patch
Comment 9 Brent Fulgham 2021-03-15 16:41:20 PDT
Comment on attachment 423255 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=423255&action=review

r=me

> Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:54
> +static NSDictionary *createAlternateQuery(const String&) { return [NSDictionary alloc]; }

Could this just be return nil, or perhapss ASSERT_NOT_REACHED? I don't think we should ever hit this code path.
Comment 10 Chris Dumez 2021-03-15 16:46:21 PDT
Comment on attachment 423255 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=423255&action=review

>> Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:54
>> +static NSDictionary *createAlternateQuery(const String&) { return [NSDictionary alloc]; }
> 
> Could this just be return nil, or perhapss ASSERT_NOT_REACHED? I don't think we should ever hit this code path.

Please don't call [NSDictionary alloc] here, this would leak.
Comment 11 Chris Dumez 2021-03-15 16:54:44 PDT
Comment on attachment 423255 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=423255&action=review

> Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:142
> +        query = createAlternateQuery(rpId);

Based on how this is used, createAlternateQuery() seems to either leak or return an autoreleased value. If it returns an autoreleased value, then I think we should not use "create" in the name. If it returns a value that is not autoreleased, then I think createAlternateQuery() should return a RetainPtr<>.
Comment 12 Kate Cheney 2021-03-15 20:47:24 PDT
Created attachment 423292 [details]
Patch
Comment 13 Brent Fulgham 2021-03-16 09:23:55 PDT
Comment on attachment 423292 [details]
Patch

r=me
Comment 14 EWS 2021-03-16 10:34:00 PDT
Committed r274490: <https://commits.webkit.org/r274490>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 423292 [details].