bugphpGroupWare - Bugs: bug #7654, odd number of single quote...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #7654: odd number of single quote characters fail SQL commands on MySQL

Submitter:  Müller Erich <phpgwuser>
Submitted:  Mon 09 Feb 2004 10:22:03 PM UTC
   
 
Category:  wiki Item Group:  0.9.16.000 release
Severity:  3 - Normal Priority:  5 - Normal
Status:  Fixed Privacy:  Public
Assigned to:  skwashd Open/Closed:  Closed
Component Version:  SVN Operating System:  GNU/Linux - Debian
Reproducibility:  Every Time Planned Release:  None
Fixed Release: 

Jump to the original submission

Tue 16 Mar 2004 03:35:46 PM UTC, comment #6: 

found it fixed it

There is slight lag on the commits

Dave Hall <skwashd>
Group administrator
Sat 13 Mar 2004 10:08:42 PM UTC, comment #5: 

This function will fail:

        function write()
        {
                $this->db->query("INSERT INTO $this->PgTbl".
                                 " (title,version,time,supercede,mutable,username,author,comment,body)".
                                 " VALUES ('$this->dbname',$this->version,".time().','.time().",'".
                                 ($this->mutable ? 'on' : 'off') . "','$this->username','$this->hostname',".
                                 "'$this->comment','$this->text')",__LINE__,__FILE__);

Slightly modified it will work:
        function write()
        {
                $this->db->query("INSERT INTO $this->PgTbl".
                                 " (title,version,time,supercede,mutable,username,author,comment,body)".
                                 " VALUES ('$this->dbname',$this->version,".time().','.time().",'".
                                 ($this->mutable ? 'on' : 'off') . "','$this->username','$this->hostname','".
                                 addslashes($this->comment). "','" .addslashes($this->text)."')",__LINE__,__FILE__);


Louis B. Moore <lbmoore>
Thu 11 Mar 2004 11:33:23 PM UTC, comment #4: 

See also Bugs #8128

Louis B. Moore <lbmoore>
Thu 26 Feb 2004 11:11:07 AM UTC, comment #3: 

Still the same after the cvs update at UTC 11:11:00 on 26. Feb 2004:

Database error: Invalid SQL: INSERT INTO phpgw_wiki_pages (title,version,time,supercede,mutable,username,author,comment,body) VALUES ('phpGroupWare',6,1077793439,1077793439,'on','Erich','xxx.xxx.xxx.xxx','',''''Testing.''' ')
MySQL Error: 1064 (You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'Testing.''' ')' at lin)

File: /usr/share/phpgroupware/wiki/inc/class.sowiki.inc.php
Line: 116
Session halted.

Müller Erich <phpgwuser>
Thu 26 Feb 2004 02:53:06 AM UTC, comment #2: 

I have looked through this one.  I can't replicate it.  When did you last update from cvs?

Dave Hall <skwashd>
Group administrator
Fri 13 Feb 2004 09:09:05 AM UTC, comment #1: 

I have this problem too, please fix, it's quite simple ...

Anonymous
Mon 09 Feb 2004 10:22:03 PM UTC, original submission:  

Database error: Invalid SQL: INSERT INTO phpgw_wiki_pages (title,version,time,supercede,mutable,username,author,comment,body) VALUES ('phpGroupWare',4,1076365136,1076365136,'on','Erich','xxx.xxx.xxx.233','',''''')
MySQL Error: 1064 (You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '''''')' at line 1)

File: /usr/share/phpgroupware/wiki/inc/class.sowiki.inc.php
Line: 116
Session halted.

Müller Erich <phpgwuser>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 5 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-03-16 skwashd Open/ClosedOpen Closed
2004-03-16 skwashd Item Group0.9.16RC2 0.9.16.000 release
    StatusWorks For Me Fixed
2004-02-26 skwashd StatusNone Works For Me
2004-02-25 skwashd Assigned toNone skwashd

Back to the top

Powered by Savane 3.13-758e.
Corresponding source code