Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#605 Cannot enter a comment with single quote in Postgresql

Database
open
nobody
Postgresql (18)
5
2014-07-31
2008-05-27
No

Hello,

We have a serious bug when our users enter a comment with a single quote.

The history of the page is corrupted (this is reproducible), and some strange
things might happen afterwards. For example, in some of our pages, the Table of
Contents is no longer displayed.

Configuration:

  • PearDB
  • PostgreSQL

Analysis:

If a page is edited and saved with a single quote in the summary, data of this page
(editor, summary, ...) are not displayed when history is requested.

This bug appends when a PostgreSQL server is used.
In this case, function 'set_versiondata' of PearDB.php is called (because
this function doesn't exist in PearDB_pgsql.php) and 'set_versiondata' call
'_serialize' defined in PearDB_pgsql.php.
But this '_serialize' function 'quotes' data while 'set_versiondata' assumes
it is not done.

The lenght of the serialized data is incorrect.

Proposed correction:

In file PearDB_pgsql.php
comment out function _serialize($data)

Can you please confirm that the correction is OK so that I can commit in CVS?

Thank you in advance.

Discussion

    • summary: Cannot enter un comment with single quote in Postgresql --> Cannot enter a comment with single quote in Postgresql
    • Group: --> Database