<?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>Possible Bug with Quoting in Postgres Backend</title> 
  <pubDate>Fri, 10 Apr 2026 07:55:34 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/8364</link> 
  <atom:link rel="self" type="application/rss+xml" title="Possible Bug with Quoting in Postgres Backend" href="https://bugs.horde.org/ticket/8364/rss" /> 
  <description>Possible Bug with Quoting in Postgres Backend</description> 
 
   
   
  <item> 
   <title>There seems to be a quoting issue in the script provided tha</title> 
   <description>There seems to be a quoting issue in the script provided that generates the following error message on an UBUNTU distro install with the deb packages.  The backend is a postgres SQL database...

----------- Error Message --------------

 [pid 23811 on line 422 of &quot;/usr/share/horde3/lib/Horde/Share/sql.php&quot;]

Jun 21 15:12:37 HORDE [error] [kronolith] MDB2 Error: no such field: _doQuery: [Error message: Could not execute statement]

[Last executed query: SELECT s.*  FROM kronolith_shares s  LEFT JOIN kronolith_shares_users AS u ON u.share_id = s.share_id LEFT JOIN kronolith_shares_groups AS g ON g.share_id = s.share_id WHERE s.share_owner = &#039;mwsanders&#039; OR (s.perm_creator &amp; 2) &lt;&gt; 0 OR (s.perm_default &amp; 2) &lt;&gt; 0 OR ( u.user_uid = &#039;mwsanders&#039; AND (u.perm &amp; 2) &lt;&gt; 0) OR ( g.group_uid IN (&quot;2&quot;) AND (g.perm &amp; 2) &lt;&gt; 0) ORDER BY s.attribute_name ASC]

[Native message: ERROR:  column &quot;2&quot; does not exist

LINE 1: ...ders&#039; AND (u.perm &amp; 2)  0) OR ( g.group_uid IN (&quot;2&quot;) AND (...

-------------- End Error Message ---------------------



The attached script resolves the issue for this platform, but should probably be implemented with a DB-&gt;Quote call....   Not a PHP programmer....  Don&#039;t know if this was already addressed in following 2.3.x releases.





--------------------  Change in sql.php / @ Line 623 ------------------  

/* Old Line ---

                $where .= &#039; OR ( g.group_uid IN (&quot;&#039; . implode(&#039;&quot;,&quot;&#039;, array_keys($groups)) . &#039;&quot;)&#039; */

/* New Line */

		$where .= &#039; OR ( g.group_uid IN (\&#039;&#039; . implode(&#039;\&#039;,\&#039;&#039;, array_keys($groups)) . &#039;\&#039;)&#039;

---------------------- End change -------------------------------------



Respectfully,

Matthew Wells Sanders</description> 
   <pubDate>Sun, 21 Jun 2009 21:49:29 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8364#t54651</link> 
  </item> 
   
  <item> 
   <title>This code is in Horde, not Kronolith. And if your Horde vers</title> 
   <description>This code is in Horde, not Kronolith. And if your Horde version is as old as your Kronolith version, then please update first.</description> 
   <pubDate>Mon, 22 Jun 2009 12:00:11 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8364#t54657</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
