<?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=Text_Wiki_Mediawiki&amp;PHPSESSID=jfurjajqpt756h6fllnlhpl8t0</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/16701" />
      <rdf:li rdf:resource="http://pear.php.net/bug/8504" />

     </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/16701">
      <title>Text_Wiki_Mediawiki: Bug 16701 [Open] XSS with Tables possible</title>
      <link>http://pear.php.net/bugs/16701</link>
      <content:encoded><![CDATA[<pre>Text_Wiki_Mediawiki Bug
Reported by jurik
2009-10-15T10:15:16+00:00
PHP: 5.2.5 OS: Linux Package Version: 0.2.0

Description:
------------
One can inject javascript code in table definitions.

Our resolution:

in Parse/Mediawiki/Table.php
-----------------------
--- add code ---
    /**
     * Remove all bogus formatting
     * Allowed are key=&quot;value&quot; pairs only
     *
     * @param string $format
     * @return string
     */
    private function _cleanupFormat($format)
    {
      $validAttrs = array();
      // regex pitch: (\w) = [&quot;'] (.*) [&quot;']
      if (preg_match_all('/\s*(\w+)\s*=\s*([&quot;\'])(.*)\\2/U', $format, $matches)) {
        for ($i = 0; $i &lt; count($matches[0]); $i++) {
          $validAttrs[] = $matches[1][$i] . '=&quot;' . htmlspecialchars($matches[3][$i], ENT_QUOTES) . '&quot;';
        }        
      }
      
      return implode(' ', $validAttrs);
    }
----------------------
--- around line 170 replace with ---
        if ($format = trim($matches[1])) {
            $param['format'] = $this-&gt;_cleanupFormat($format);
        }
---


Test script:
---------------
You can try to render this snippet:

{| &gt;&lt;script&gt;alert('gotcha!');&lt;/script
|}

Actual result:
--------------
javascript gets executed</pre>]]></content:encoded>
      <description><![CDATA[<pre>Text_Wiki_Mediawiki Bug
Reported by jurik
2009-10-15T10:15:16+00:00
PHP: 5.2.5 OS: Linux Package Version: 0.2.0

Description:
------------
One can inject javascript code in table definitions.

Our resolution:

in Parse/Mediawiki/Table.php
-----------------------
--- add code ---
    /**
     * Remove all bogus formatting
     * Allowed are key=&quot;value&quot; pairs only
     *
     * @param string $format
     * @return string
     */
    private function _cleanupFormat($format)
    {
      $validAttrs = array();
      // regex pitch: (\w) = [&quot;'] (.*) [&quot;']
      if (preg_match_all('/\s*(\w+)\s*=\s*([&quot;\'])(.*)\\2/U', $format, $matches)) {
        for ($i = 0; $i &lt; count($matches[0]); $i++) {
          $validAttrs[] = $matches[1][$i] . '=&quot;' . htmlspecialchars($matches[3][$i], ENT_QUOTES) . '&quot;';
        }        
      }
      
      return implode(' ', $validAttrs);
    }
----------------------
--- around line 170 replace with ---
        if ($format = trim($matches[1])) {
            $param['format'] = $this-&gt;_cleanupFormat($format);
        }
---


Test script:
---------------
You can try to render this snippet:

{| &gt;&lt;script&gt;alert('gotcha!');&lt;/script
|}

Actual result:
--------------
javascript gets executed</pre>]]></description>
      <dc:date>2009-10-15T10:15:16+00:00</dc:date>
      <dc:creator>mail &amp;#x61;&amp;#116; jurikuehn &amp;#x64;&amp;#111;&amp;#x74; de</dc:creator>
      <dc:subject>Text_Wiki_Mediawiki Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/8504">
      <title>Text_Wiki_Mediawiki: Feature/Change Request 8504 [Open] MediaWiki citation format</title>
      <link>http://pear.php.net/bugs/8504</link>
      <content:encoded><![CDATA[<pre>Text_Wiki_Mediawiki Feature/Change Request
Reported by bjs5075@...
2006-08-18T09:26:45+00:00
PHP: 5.1.4 OS: Debian etch Package Version: CVS

Description:
------------
I have created a MediaWiki-style citation parser/renderer 
this spans more than one PEAR package, and is quite 
specific to mediawiki, so I'm posting the notice here.
There are four files involved, so I don't want to paste 
them in here.

If you want the files, you can email me directly.
I don't know if you will be able to easily integrate them, 
but I want to release the source now so that it can be 
worked on later.

Test script:
---------------
Citation format:
text1&lt;ref&gt;reference text&lt;/ref&gt;

text2&lt;ref name=&quot;this&quot;&gt;that&lt;/ref&gt;

text3&lt;ref name=&quot;this&quot; /&gt;

text4&lt;ref name=&quot;this&quot;&gt;

etc.

&lt;references /&gt;


Expected result:
----------------
text1 [1]
text2 [2]
text3 [2]
text4 [2]

1. ^ reference text
2. ^abc that


Actual result:
--------------
Currently no support</pre>]]></content:encoded>
      <description><![CDATA[<pre>Text_Wiki_Mediawiki Feature/Change Request
Reported by bjs5075@...
2006-08-18T09:26:45+00:00
PHP: 5.1.4 OS: Debian etch Package Version: CVS

Description:
------------
I have created a MediaWiki-style citation parser/renderer 
this spans more than one PEAR package, and is quite 
specific to mediawiki, so I'm posting the notice here.
There are four files involved, so I don't want to paste 
them in here.

If you want the files, you can email me directly.
I don't know if you will be able to easily integrate them, 
but I want to release the source now so that it can be 
worked on later.

Test script:
---------------
Citation format:
text1&lt;ref&gt;reference text&lt;/ref&gt;

text2&lt;ref name=&quot;this&quot;&gt;that&lt;/ref&gt;

text3&lt;ref name=&quot;this&quot; /&gt;

text4&lt;ref name=&quot;this&quot;&gt;

etc.

&lt;references /&gt;


Expected result:
----------------
text1 [1]
text2 [2]
text3 [2]
text4 [2]

1. ^ reference text
2. ^abc that


Actual result:
--------------
Currently no support</pre>]]></description>
      <dc:date>2006-08-18T09:26:45+00:00</dc:date>
      <dc:creator>bjs5075 &amp;#x61;&amp;#116; rit &amp;#x64;&amp;#111;&amp;#x74; edu</dc:creator>
      <dc:subject>Text_Wiki_Mediawiki Feature/Change Request</dc:subject>
    </item>
</rdf:RDF>
