[Tickets #9153] Re: BYTEA DB escaping for postgres driver
bugs at horde.org
bugs at horde.org
Fri Oct 8 15:31:58 UTC 2010
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/9153
------------------------------------------------------------------------------
Ticket | 9153
Updated By | Michael Slusarz <slusarz at horde.org>
Summary | BYTEA DB escaping for postgres driver
Queue | Horde Framework Packages
Version | Git master
Type | Bug
State | Assigned
Priority | 3. High
Milestone | 4.0
Patch |
Owners | Horde Developers, Chuck Hagenbuch
------------------------------------------------------------------------------
Michael Slusarz <slusarz at horde.org> (2010-10-08 11:31) wrote:
Don't have a test case at the moment, but see, e.g., the code in
Horde_Prefs_Sql.
Line 84:
switch ($this->_db->adapterName()) {
case 'PDO_PostgreSQL':
// TODO: Should be done in DB driver
if (is_resource($row['pref_value'])) {
$val = stream_get_contents($row['pref_value']);
fclose($row['pref_value']);
$row['pref_value'] = $val;
}
$row['pref_value'] = pg_unescape_bytea($row['pref_value']);
break;
}
Line 146:
switch ($this->_db->adapterName()) {
case 'PDO_PostgreSQL':
// TODO: Should be done in DB driver
$value = pg_escape_bytea($value);
break;
}
This is necessary because of Bug #8130.
More information about the bugs
mailing list