Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Apr 19, 2024 1:20 am
Voice Broadcast System


All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Select & Update Not Allowed in Names
PostPosted: Tue May 28, 2013 3:23 pm 
Offline

Joined: Thu Mar 06, 2008 9:14 pm
Posts: 14
Hi,

We are using A2Billing v2.0.1

I guess this is an anti MySQL injection measure, but seems a little excessive - there are better ways to do this.

If I create a new card and set the company name to 'Selection Recruitment', when saving, the system removes the word 'Select' from the name, leaving 'ion Recruitment'. The same for the word 'Update'.

Is there anywhere that this behavior can be bypassed?

Thanks,
Mark


Top
 Profile  
 
 Post subject: Re: Select & Update Not Allowed in Names
PostPosted: Wed Jun 05, 2013 4:02 pm 
Offline

Joined: Thu Mar 06, 2008 9:14 pm
Posts: 14
OK, I did the digging and see that /common/lib/Misc.php has the function sanitize_data which protects us from any of the following strings in just about any text field.

#injection sql
$input = str_ireplace('HAVING', '', $input);
$input = str_ireplace('UNION', '', $input);
$input = str_ireplace('SUBSTRING', '', $input);
$input = str_ireplace('ASCII', '', $input);
$input = str_ireplace('SHA1', '', $input);
$input = str_ireplace('MD5', '', $input);
$input = str_ireplace('SCRIPT', '', $input);
$input = str_ireplace('ROW_COUNT', '', $input);
$input = str_ireplace('SELECT', '', $input);
$input = str_ireplace('UPDATE', '', $input);
#$input = str_ireplace('DELETE', '', $input);

Actually, without mysql_real_escape_string() it could mean a lot of additional code to protect against SQL injection. I guess this approach is a good compromise.

Keep up the excellent work.

Mark


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 
Auto Dialer Software


All times are UTC


Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group