Bug Tracker item #3023888, was opened at 2010-07-01 18:19
Message generated for change (Comment added) made by sbajic
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1126467&aid=3023888&group_id=250683

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: daemon
Group: v3.9.0
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Stéphane Berthelot (sberthelot)
>Assigned to: Stevan Bajic (sbajic)
Summary: Wrong escaping of bytea (signature data) with postgresql 8.4

Initial Comment:
Escaping of insertion has been modified in 3.9.0 in two ways :
- using PQescapeByteaConn (instead of PQescapeBytea)
- adding E'' syntax in INSERT

But this encodes twice the data and then doesn't work on fresh PostgreSQL 8.4.2 
with or without standard_conforming_string in either UTF8 or SQL_ASCII database 
encoding.

Removing the E'' syntax (since the string is already correctly encoded now) 
makes signature insertion work again

In the git code, it may be necessary to add the if construct in this patch to 
check about postgresql version (but <=7.4 seem not supported anymore officially 
by the postgres team now ...)

----------------------------------------------------------------------

>Comment By: Stevan Bajic (sbajic)
Date: 2010-08-04 23:38

Message:
> But this encodes twice the data
>
This is simply not true. The 'E' syntax is telling PostgreSQL that the
data is not a string literal but a escaped string. That's all.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1126467&aid=3023888&group_id=250683

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Dspam-devel mailing list
Dspam-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspam-devel

Reply via email to