<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>239737</bug_id>
          
          <creation_ts>2022-04-25 11:55:37 -0700</creation_ts>
          <short_desc>WebAuthn userHandle must be null, not empty string</short_desc>
          <delta_ts>2024-03-04 19:31:15 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>Safari 15</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>macOS 12</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Boris Lykah">lykahb</reporter>
          <assigned_to name="pascoe@apple.com">pascoe</assigned_to>
          <cc>henrik.willert</cc>
    
    <cc>pascoe</cc>
    
    <cc>tmj.chu</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1864180</commentid>
    <comment_count>0</comment_count>
    <who name="Boris Lykah">lykahb</who>
    <bug_when>2022-04-25 11:55:37 -0700</bug_when>
    <thetext>The WebAuthn implementation returns userHandle: &quot;&quot;, which does not conform to this part of the spec: https://www.w3.org/TR/webauthn-2/#dom-publickeycredentialuserentity-id

This breaks the checks on my Relying Party server. The same security key returns userHandle null on Firefox and Chromium. So it seems Safari replaces null with an empty string.

Steps to reproduce:
1. Open https://webauthn.io
2. Register YubiKey or another cross-platform security key. Registration with TouchID does not reproduce the issue.
3. Authenticate. On Safari 15 just activate the security key. On Safari Technology Preview choose &quot;Account from Security Key&quot;.
4. Observe that the network request with the assertion has userHandle: &quot;&quot;. It must be null to conform to the spec.

This bug may be related to https://bugs.webkit.org/show_bug.cgi?id=191521 [WebAuthN] UserHandle can be null.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1864320</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-04-25 18:05:32 -0700</bug_when>
    <thetext>&lt;rdar://problem/92305724&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1913812</commentid>
    <comment_count>2</comment_count>
    <who name="">tmj.chu</who>
    <bug_when>2022-11-20 23:25:35 -0800</bug_when>
    <thetext>Hi everyone,
I am still seeing that this bug is still happening with Safari.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2004030</commentid>
    <comment_count>3</comment_count>
    <who name="">henrik.willert</who>
    <bug_when>2024-01-10 01:17:04 -0800</bug_when>
    <thetext>This nonconformity currently causes the Yubico java-webauthn-server library to to throw an exception for logins in Safari with a security key.
https://github.com/Yubico/java-webauthn-server/issues/327
https://github.com/Yubico/java-webauthn-server/issues/194

It&apos;s probably the same for other libraries abiding to the spec. 

We&apos;re advising our Safari users to migrate to other browsers, but would strongly prefer a patch in Safari.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2004559</commentid>
    <comment_count>4</comment_count>
    <who name="pascoe@apple.com">pascoe</who>
    <bug_when>2024-01-11 15:39:57 -0800</bug_when>
    <thetext>https://github.com/WebKit/WebKit/pull/22681</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2018660</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-03-04 19:31:14 -0800</bug_when>
    <thetext>Committed 275669@main (04d4979c9e1d): &lt;https://commits.webkit.org/275669@main&gt;

Reviewed commits have been landed. Closing PR #22681 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>