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

 
 

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

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

Submitted by:  Kai Hofmann <powerstat>
Submitted on:  Tue 29 Apr 2003 09:06:03 AM UTC  
 
Item Group: SVN trunk (dev code)Category: registration
Severity: 3 - NormalPriority: 3 - Low
Status: NonePrivacy: Public
Assigned to: Joseph Engo <jengo>Open/Closed: Open
Component Version: NoneOperating System: None
Reproducibility: Every TimePlanned 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>
Project 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>

 

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

Date Changed By Updated Field Previous Value => Replaced By
Thu 15 Jul 2004 11:00:00 PM UTCskwashdPlanned ReleaseNone=>0.9.18.000
Wed 21 Apr 2004 08:10:46 AM UTCskwashdPriority5 - Normal=>3 - Low
  Assigned toskwashd=>jengo
Wed 21 Apr 2004 07:42:29 AM UTCcboettgerAssigned toNone=>skwashd
Tue 29 Apr 2003 10:46:03 PM UTCskwashdReproducibilityNone=>(Error - Not Found)
  SummaryBad SQL and relation usage=>

Back to the top


Powered by Savane 3.1-cleanup