<?xml version="1.0"?>
<?xml-stylesheet
href="http://www.w3.org/2000/08/w3c-synd/style.css" type="text/css"
?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel rdf:about="http://pear.php.net/bugs/search.php">
    <title>PEAR Bug Search Results</title>
    <link>http://pear.php.net/bugs/search.php?cmd=display&amp;package_name%5B0%5D=Net_URL2</link>
    <description>Search Results</description>
    <dc:language>en-us</dc:language>
    <dc:creator>pear-webmaster@lists.php.net</dc:creator>
    <dc:publisher>pear-webmaster@lists.php.net</dc:publisher>
    <admin:generatorAgent rdf:resource="http://pear.php.net/bugs"/>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
    <items>
     <rdf:Seq>
      <rdf:li rdf:resource="http://pear.php.net/bug/21153" />
      <rdf:li rdf:resource="http://pear.php.net/bug/20425" />

     </rdf:Seq>
    </items>
  </channel>

  <image rdf:about="http://pear.php.net/gifs/pearsmall.gif">
    <title>PEAR Bugs</title>
    <url>http://pear.php.net/gifs/pearsmall.gif</url>
    <link>http://pear.php.net/bugs</link>
  </image>

    <item rdf:about="http://pear.php.net/bug/21153">
      <title>Net_URL2: Bug 21153 [Open] When OPTION_ENCODE_KEYS is set to true, some brackets ([ and ]) arent' encoded</title>
      <link>http://pear.php.net/bugs/21153</link>
      <content:encoded><![CDATA[<pre>Net_URL2 Bug
Reported by jayklehr
2016-12-10T00:52:20+00:00
PHP: 5.6.27 OS: osx Package Version: 2.1.2

Description:
------------
I noticed when running some tests against Net_URL2 that stray/non-matching brackets (like those used in the query string test of the library) are encoded with %5B and %5D, but if the brackets are the result of building from a PHP array, they're not encoded.

This appears to be because of this line in URL2.php:

&gt; $name = $key . '[' . $name . ']';

The `rawurlencode` for the $key parameter happens earlier in this method, so the brackets remain untouched.

Test script:
---------------
&lt;?php

$url = new Net_URL2('');

$url-&gt;setQuery('key1[=value&amp;key2[]=value');
$vars = $url-&gt;getQueryVariables();

$url-&gt;setQueryVariables($vars);
$newString = $url-&gt;getQuery();

var_export($newString);

Expected result:
----------------
'key1%5B=value&amp;key2%5B%5D=value'

Actual result:
--------------
'key1%5B=value&amp;key2[]=value'</pre>]]></content:encoded>
      <description><![CDATA[<pre>Net_URL2 Bug
Reported by jayklehr
2016-12-10T00:52:20+00:00
PHP: 5.6.27 OS: osx Package Version: 2.1.2

Description:
------------
I noticed when running some tests against Net_URL2 that stray/non-matching brackets (like those used in the query string test of the library) are encoded with %5B and %5D, but if the brackets are the result of building from a PHP array, they're not encoded.

This appears to be because of this line in URL2.php:

&gt; $name = $key . '[' . $name . ']';

The `rawurlencode` for the $key parameter happens earlier in this method, so the brackets remain untouched.

Test script:
---------------
&lt;?php

$url = new Net_URL2('');

$url-&gt;setQuery('key1[=value&amp;key2[]=value');
$vars = $url-&gt;getQueryVariables();

$url-&gt;setQueryVariables($vars);
$newString = $url-&gt;getQuery();

var_export($newString);

Expected result:
----------------
'key1%5B=value&amp;key2%5B%5D=value'

Actual result:
--------------
'key1%5B=value&amp;key2[]=value'</pre>]]></description>
      <dc:date>2016-12-10T00:52:20+00:00</dc:date>
      <dc:creator>jay &amp;#x61;&amp;#116; diablomedia &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Net_URL2 Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/20425">
      <title>Net_URL2: Bug 20425 [Open] Incomplete percent-encoding of userinfo, path and query</title>
      <link>http://pear.php.net/bugs/20425</link>
      <content:encoded><![CDATA[<pre>Net_URL2 Bug
Reported by pracj3am
2014-10-09T06:23:40+00:00
PHP: Irrelevant OS:  Package Version: 2.0.9

Description:
------------
When parsing URI, characters that are invalid are percent-encoded in the userinfo, path 
and query part (method _encodeData). But there are more characters that should be 
percent-encoded according to rfc3986 like [ ] | ` { }. Concretely this is the whole set:
[\x-\x20\x22\x3C\x3E\5B-\5E\x60\7B-\7D\7F-\FF]

Also the same charcters should be pecent-encoded in a fragment part.

Test script:
---------------
echo (new Net_URL2('http://user[1]@example.com/p\s/|&quot; ?{}#^'))-&gt;getUrl();

Expected result:
----------------
http://user%5B1%5D@example.com/p%5Cs/%7C%22%20?%7B%7D#%5E

Actual result:
--------------
http://user[1]@example.com/p\s/|%22%20?{}#^</pre>]]></content:encoded>
      <description><![CDATA[<pre>Net_URL2 Bug
Reported by pracj3am
2014-10-09T06:23:40+00:00
PHP: Irrelevant OS:  Package Version: 2.0.9

Description:
------------
When parsing URI, characters that are invalid are percent-encoded in the userinfo, path 
and query part (method _encodeData). But there are more characters that should be 
percent-encoded according to rfc3986 like [ ] | ` { }. Concretely this is the whole set:
[\x-\x20\x22\x3C\x3E\5B-\5E\x60\7B-\7D\7F-\FF]

Also the same charcters should be pecent-encoded in a fragment part.

Test script:
---------------
echo (new Net_URL2('http://user[1]@example.com/p\s/|&quot; ?{}#^'))-&gt;getUrl();

Expected result:
----------------
http://user%5B1%5D@example.com/p%5Cs/%7C%22%20?%7B%7D#%5E

Actual result:
--------------
http://user[1]@example.com/p\s/|%22%20?{}#^</pre>]]></description>
      <dc:date>2014-12-29T16:57:03+00:00</dc:date>
      <dc:creator>jan &amp;#x64;&amp;#111;&amp;#x74; prachar &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Net_URL2 Bug</dc:subject>
    </item>
</rdf:RDF>
