<?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>21975</bug_id>
          
          <creation_ts>2008-10-30 10:15:08 -0700</creation_ts>
          <short_desc>decodeURLEscapeSequences will generate embedded null characters</short_desc>
          <delta_ts>2024-04-29 05:37:56 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Platform</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>37641</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Brett Wilson (Google)">brettw</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>ahmad.saleem792</cc>
    
    <cc>annevk</cc>
    
    <cc>ap</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>97134</commentid>
    <comment_count>0</comment_count>
    <who name="Brett Wilson (Google)">brettw</who>
    <bug_when>2008-10-30 10:15:08 -0700</bug_when>
    <thetext>This function will convert %00 to an embedded null character in the output string. This function is used in many of KURL&apos;s getters.

This is potentially dangerous. IE, Firefox, and Google Chrome don&apos;t convert %00 to NULL, even in Javascript URLs. Some APIs don&apos;t expect embedded NULLs.

One such API is KURL::init. It does things like this:
while (*relStringPos &amp;&amp; *relStringPos != &apos;?&apos; &amp;&amp; *relStringPos != &apos;#&apos;) {
which will stop at an embedded NULL. This means that if you build up a URL from parts extracted from a different URL, it could be completely different. This could be a security bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2029865</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2024-04-19 09:06:53 -0700</bug_when>
    <thetext>@Anne - you worked in URL space heavily in past year or so, is this bug applicable anymore?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2031846</commentid>
    <comment_count>2</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2024-04-29 05:37:56 -0700</bug_when>
    <thetext>I&apos;m not sure, but there is behavior here that is not defined in the specification. Compare:

  data:text/html,a%00a
  data:text/html,a%01a

In the first data: URL the 0x00 byte is dropped. The 0x01 byte is preserved. That does not seem like great behavior to me. I filed https://github.com/whatwg/fetch/issues/1748 as a start.

Now obviously we have to look at other consumers as well for this bug to fully rule out anything problematic.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>