phpgroupware-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-tracker] [Bug #3374] Bad SQL and poor relation in /registr


From: nobody
Subject: [Phpgroupware-tracker] [Bug #3374] Bad SQL and poor relation in /registration/inc/class.soreg.inc.php
Date: Tue, 29 Apr 2003 18:46:03 -0400

=================== BUG #3374: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=3374&group_id=509

Changes by: Dave Hall <address@hidden>
Date: Wed 04/30/2003 at 08:46 (Australia/Melbourne)

            What     | Removed                   | Added
---------------------------------------------------------------------------
     Reproducibility | None                      | Every Time
             Summary | Bad SQL and relation usage | Bad SQL and poor relation 
in /registration/inc/class.soreg.inc.php 




=================== BUG #3374: FULL BUG SNAPSHOT ===================


Submitted by: powerstat               Project: phpGroupWare                 
Submitted on: Tue 04/29/2003 at 19:06
Category:  registration               Bug Group:  devel cvs                 
Severity:  5 - Major                  Priority:  Normal                     
Resolution:  None                     Assigned to:  None                    
Status:  Open                         Component Version:  None              
Platform Version:  None               Reproducibility:  Every Time          

Summary:  Bad SQL and poor relation in /registration/inc/class.soreg.inc.php 

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




No Followups Have Been Posted


CC list is empty


No files currently attached


For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=3374&group_id=509




reply via email to

[Prev in Thread] Current Thread [Next in Thread]