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.
Thread Tools Display Modes
Old 11th August 2009, 22:05
moglia moglia is offline
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.

Reply With Quote
Sponsored Links
Old 11th August 2009, 23:25
till till is offline
Super Moderator
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,022
Thanks: 840
Thanked 5,655 Times in 4,464 Posts

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 (12th August 2009)


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 05:14.

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