Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 11th August 2009, 21:05
moglia moglia is offline
Member
 
Join Date: Apr 2009
Posts: 92
Thanks: 7
Thanked 15 Times in 11 Posts
Lightbulb Revision 1309 - mysql_real_escape_string

Sugestion about Revision 1309. Fixed: FS#754 - mailfilter problem

mysql_real_escape_string used direct without
abstraction database layer.

$mailuser = $app->db->queryOneRecord("SELECT sys_groupid, custom_mailfilter FROM mail_user WHERE mailuser_id = ".$this->dataRecord["mailuser_id"]);
$rule_content = $mailuser['custom_mailfilter']."\n".$app->db->quote($this->getRule());

I see db class you can not use $app->db->quote insted mysql_real_escape_string.

$rule_content = mysql_real_escape_string($rule_content);

$rule_content = $app->db->quote($rule_content)

turns code portable to another database is it´s necessary.

if not possible use $app->db->quote i sugest
create another method in class to do it.


Im folow code revisions to learn and soon as possible test some features every day.

Regards,
Moglia.
Reply With Quote
Sponsored Links
  #2  
Old 11th August 2009, 22:25
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,171
Thanks: 829
Thanked 5,412 Times in 4,255 Posts
 
Default

I've changed that.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
moglia (11th August 2009)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 14:33.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.