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

Submitted by:  Müller Erich <phpgwuser>
Submitted on:  Mon 09 Feb 2004 10:22:03 PM UTC  
 
Item Group: 0.9.16.000 releaseCategory: wiki
Severity: 3 - NormalPriority: 5 - Normal
Status: FixedPrivacy: Public
Assigned to: Dave Hall <skwashd>Open/Closed: Closed
Component Version: SVNOperating System: GNU/Linux - Debian
Reproducibility: Every TimePlanned Release: None
Fixed Release: 

(Jump to the original submission 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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 5 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Tue 16 Mar 2004 03:37:02 PM UTCskwashdOpen/ClosedOpen=>Closed
Tue 16 Mar 2004 03:35:46 PM UTCskwashdItem Group0.9.16RC2=>0.9.16.000 release
  StatusWorks For Me=>Fixed
Thu 26 Feb 2004 02:53:05 AM UTCskwashdStatusNone=>Works For Me
Wed 25 Feb 2004 09:06:50 PM UTCskwashdAssigned toNone=>skwashd

Back to the top


Powered by Savane 3.1-cleanup1