Here are some more details from JP.
You will find below the WFS-T trace obtained from Wireshark when our server (using geotools) performs a request to geoserver-1.6.0-RC3. The problem has to do with the first property named "statement". In it, an apostrophe is sent within a text node of the XML document, which is valid.
I do not have the corresponding SQL command issued to PostgreSQL, however in earlier tests I saw that the UPDATE was being done using a single quoted string, therefore it bails on the "s" following the apostrophe. Hence, the error message returned by geoserver.
If you require any more information, do not hesitate to contact me directly.
JP
<?xml version="1.0" encoding="UTF-8"?>
<Transaction xmlns:glsl="http://schemas.gcrc.carleton.ca/glsl" xmlns="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" version="1.0.0" service="WFS" lockAction="ALL"><Update typeName="glsl:artists"><Property><Name>statement</Name>
<Value>Test with apostrophe's in the middle</Value>
</Property>
<Property><Name>artist_name</Name>
<Value>Jeff Thomas</Value>
</Property>
<Property><Name>website</Name>
<Value>http://www.scoutingforindians.com/index.html</Value>
</Property>
<Property><Name>email</Name>
<Value></Value>
</Property>
<Property><Name>the_geom</Name>
<Value><gml:MultiPoint srsName="EPSG:4326"><gml:pointMember><gml:Point><gml:coordinates decimal="." cs="," ts=" ">-75.0,45.0</gml:coordinates>
</gml:Point>
</gml:pointMember>
</gml:MultiPoint>
</Value>
</Property>
<Property><Name>artist_id</Name>
<Value>1</Value>
</Property>
<Property><Name>long</Name>
<Value>0.0</Value>
</Property>
<Property><Name>biography</Name>
<Value>Jeff Thomas is an Iroquois/Onondaga member of the Six Nations Reserve, curator, photographer and cultural analyst now living in Ottawa who has works in major collections in Canada, the United States and Europe. Jeff's most recent solo shows were Jeff Thomas: Traces of Iroquois Medicine, Ontario Museum of Archaeology, London, Ontario, Portraits from the Dancing Grounds, McMichael Canadian Art Collection, in Toronto, Jeff Thomas: A Study of Indian-ness in Toronto, and Shelley Niro and Jeff Thomas: Contemporary Voices, Canada House, London, England. He has also been in many group shows, including Images of the American Indian at the Birchfield-Penney Art Center, American West. Compton Verney, Warwickshire, England and About Face: Native American Self-Portraits, Wheelwright Museum of the American Indian, Santa Fe, New Mexico. In 1998, he was awarded the Canada Council's prestigious Duke and Duchess of York Award in Photography.
His specialty is the exploration of historical cultural resources to bring voices, stories and perspectives into the present. In his curatorial projects, such as ......Where are the Children: Healing the Legacy of Residential Schools......, ......Emergence from the Shadow: First Peoples' Photographic Perspectives...... at the Canadian Museum of Civilization and ......Aboriginal Portraits at the National Archives of Canada......, Jeff has mined the archival vaults of non-Native visual and written records to recover lost elements of Aboriginal history.</Value>
</Property>
<Property><Name>lat</Name>
<Value>0.0</Value>
</Property>
<ogc:Filter><ogc:FeatureId fid="artists.1"/>
</ogc:Filter>
</Update>
</Transaction>
HTTP/1.1 200 OK
Date: Mon, 21 Apr 2008 18:23:54 GMT
Content-Type: text/xml
Keep-Alive: timeout=5, max=98
Connection: Keep-Alive
Transfer-Encoding: chunked
2a9
<?xml version="1.0" encoding="UTF-8"?><wfs:WFS_TransactionResponse version="1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://atlases.gcrc.carleton.ca:80/geoserver/schemas/wfs/1.0.0/WFS-transaction.xsd"><wfs:InsertResult><ogc:FeatureId fid="none"/></wfs:InsertResult> <wfs:TransactionResult> <wfs:Status> <wfs:FAILED/> </wfs:Status> <wfs:Message>org.geotools.data.DataSourceException: Some sort of database connection error: ERROR: syntax error at or near "s"</wfs:Message> </wfs:TransactionResult></wfs:WFS_TransactionResponse>
0
This looks like it is actually a security problem.
Strings that contain apostrophes are being passed to our PostGIS datastore as SQL without escaping properly. This opens the door for SQL injection attacks.