<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Colons within quoted parameter values are not handled correctly</title> 
  <pubDate>Fri, 10 Apr 2026 17:02:22 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/7031</link> 
  <atom:link rel="self" type="application/rss+xml" title="Colons within quoted parameter values are not handled correctly" href="https://bugs.horde.org/ticket/7031/rss" /> 
  <description>Colons within quoted parameter values are not handled correctly</description> 
 
   
   
  <item> 
   <title>Suppose an iCalendar file has the entry



ORGANIZER;SENT-BY</title> 
   <description>Suppose an iCalendar file has the entry



ORGANIZER;SENT-BY=&quot;mailto

 :a@b.c&quot;:mailto:a@b.c



The &#039;:&#039; within the value of the parameter &quot;SENT-BY&quot; is taken as a separator between the parameters and the value of the ORGANIZER tag which is not correct. As per RFC 2445, we have in 4.1:



param-value        = paramtext / quoted-string

quoted-string      = DQUOTE *QSAFE-CHAR DQUOTE

QSAFE-CHAR = WSP / %x21 / %x23-7E / NON-US-ASCII

     ; Any character except CTLs and DQUOTE



so quoted parameter values can contain colons.



A patch is attached. It changes the regular expression for breaking down the line into tag, parameters, and values from



/([^;^:]*)((;[^:]*)?):([^\r\n]*)[\r\n]*/



to



/([^;^:]*)((;[^;^:]*=(([^&quot;^:^;][^:^;^&quot;]*)|(&quot;[^&quot;]*&quot;)))*):([^\r\n]*)[\r\n]*/

</description> 
   <pubDate>Sun, 06 Jul 2008 19:19:53 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7031#t47304</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

http://cvs.h</title> 
   <description>Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/framework/iCalendar/tests/read-escapes.phpt?r1=1.3&amp;r2=1.4&amp;ty=u</description> 
   <pubDate>Sun, 06 Jul 2008 21:08:57 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7031#t47314</link> 
  </item> 
   
  <item> 
   <title>It&#039;s far more complicated than that unfortunately, because t</title> 
   <description>It&#039;s far more complicated than that unfortunately, because the same regex must also parse vCalendar 1.0 properties which are escaped differently. Those only require semicolons in parameter values to be escaped by a preceding backslash.



I came up with the following so far:



        $name_re = &#039;[-a-zA-Z0-9]+&#039;;

        $param_text_re = &#039;[^&quot;;:,]*&#039;;

        $quoted_string_re = &#039;&quot;[^&quot;]*&quot;&#039;;

        $param_value_re = $param_text_re . &#039;|&#039; . $quoted_string_re;

        $param_re = $name_re . &#039;=&#039; . $param_value_re;

        $old_param_re = &#039;(?:&#039; . $name_re . &#039;=)?(?:[^;]|(?&lt;=\\\\);)*&#039;;



And then run the preg_match like so:



preg_match(&#039;/(&#039; . $name_re . &#039;)(;(?:&#039; . $param_re . &#039;|&#039; . $old_param_re . &#039;))*:([^\r\n]*)[\r\n]*/&#039;,

           $attribute, $parts);



This doesn&#039;t work unfortunately either, because the regex for the old format is too greedy. If using an ungreedy modifier, it becomes too ungreedy.

</description> 
   <pubDate>Sun, 06 Jul 2008 22:05:48 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7031#t47316</link> 
  </item> 
   
  <item> 
   <title>This is the full (not working) patch.</title> 
   <description>This is the full (not working) patch.</description> 
   <pubDate>Sun, 06 Jul 2008 22:07:01 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7031#t47317</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

http://cvs.h</title> 
   <description>Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/framework/iCalendar/tests/read-escapes.phpt?r1=1.4&amp;r2=1.5&amp;ty=u</description> 
   <pubDate>Mon, 18 Aug 2008 22:25:49 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7031#t48287</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

http://cvs.h</title> 
   <description>Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/framework/iCalendar/iCalendar.php?r1=1.150&amp;r2=1.151&amp;ty=u</description> 
   <pubDate>Fri, 29 Aug 2008 13:34:42 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7031#t48553</link> 
  </item> 
   
  <item> 
   <title>Fixed in CVS.</title> 
   <description>Fixed in CVS.</description> 
   <pubDate>Fri, 29 Aug 2008 13:37:13 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7031#t48556</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
