bugphpGroupWare - Bugs: bug #3374, Bad SQL and poor relation in...

 
 

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

bug #3374: Bad SQL and poor relation in /registration/inc/class.soreg.inc.php

Submitter:  Kai Hofmann <powerstat>
Submitted:  Tue 29 Apr 2003 09:06:03 AM UTC
   
 
Category:  registration Item Group:  SVN trunk (dev code)
Severity:  3 - Normal Priority:  3 - Low
Status:  None Privacy:  Public
Assigned to:  jengo Open/Closed:  Open
Component Version:  None Operating System:  None
Reproducibility:  Every Time Planned Release:  0.9.18.000
Fixed Release: 

Wed 21 Apr 2004 08:10:46 AM UTC, comment #2: 

jengo's app.  registration was not included in 16 afaik.

Dave Hall <skwashd>
Group administrator
Wed 21 Apr 2004 07:42:29 AM UTC, comment #1: 

is this still valid?
Kai, did you provide a patch?

Dr. Christian Böttger <cboettger>
Tue 29 Apr 2003 09:06:03 AM UTC, original submission:  

The SQL statement I found here is wrong - because in SQL

phpgw_addressbook.lid='*$account_lid*'

is not what you want - correct it must be:

phpgw_addressbook.lid like '%$account_lid%'

last but not least referencing two tables in this way is absolutly evil! primary and foreign keys should always
be of the same type without a pattern matching!

$GLOBALS['phpgw']->db->query("select from phpgw_accounts, phpgw_addressbook where account_lid='$account_lid' and phpgw_addressbook.lid='$account_lid*'",__LINE__,__FILE__);
./registration/inc/class.soreg.inc.php

Kai Hofmann <powerstat>

 

(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 6 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-07-15 skwashd Planned ReleaseNone 0.9.18.000
2004-04-21 skwashd Priority5 - Normal 3 - Low
    Assigned toskwashd jengo
2004-04-21 cboettger Assigned toNone skwashd
2003-04-29 skwashd ReproducibilityNone None
    SummaryBad SQL and relation usage

Back to the top

Powered by Savane 3.13-f810.
Corresponding source code