Not Logged in - No Account?
Don't have an account? Registering an account with us allows you to post to the forums, easily track new posts, subscribe to threads, pm (private message) other forum members, and receive periodic news letters (you can opt out if you desire). Once you are logged in this message will no longer appear. If you don't have an account, you can create one by registering here. Lost your password, request a new password. We respect your privacy which means we collect minimal information when you register and we do not resell that information or use it in any objectionable way. You can review our privacy policy for full details.
(PATCH) DISA module, string quoting problem with caller ID field and SQL database

Hi, in Disa 2.4.0, as part of freePBX 2.4.0Beta2.2, I ran across a problem with quoting the Caller ID field within the DISA module. I can't seem to figure out how to create a bug ticket, apparently I need some username and password that I'm not sure how to get. Anyways, so that I can end this day productive, I post it here in hopes that someone with smarts and know-how can fix the minor bug. I hereby release this in the public domain to do with as you will. I was lazy, but here is a patch:
--- functions.inc.php 2008-01-20 01:06:10.000000000 -0800
+++ Downloads/functions.inc.php 2008-01-20 01:03:26.000000000 -0800
@@ -132,7 +132,7 @@
if (!isset($needconf))
$needconf = '';
if(empty($displayname)) $displayname = "unnamed";
- $results = sql("INSERT INTO disa (displayname,pin,cid,context,resptimeout,digittimeout,needconf) values (\"".str_replace("\"", "\"\"",$displayname)."\",\"".$pin."\",'".str_replace("'", "''", $cid)."',\"".$context."\", \"$resptimeout\", \"$digittimeout\", \"$needconf\")");
+ $results = sql("INSERT INTO disa (displayname,pin,cid,context,resptimeout,digittimeout,needconf) values (\"".str_replace("\"", "\"\"",$displayname)."\",\"".$pin."\",\"".str_replace("\"", "\"\"", $cid)."\",\"".$context."\", \"$resptimeout\", \"$digittimeout\", \"$needconf\")");
}
function disa_del($id) {
@@ -147,6 +147,6 @@
if (!isset($needconf))
$needconf = '';
if(empty($displayname)) $displayname = "unnamed";
- $results = sql("UPDATE disa set displayname = \"".str_replace("\"", "\"\"",$displayname)."\", pin = \"$pin\", cid = '".str_replace("'", "''", $cid)."', context = \"$context\", resptimeout = \"$resptimeout\", digittimeout = \"$digittimeout\", needconf = \"$needconf\" where disa_id = \"$id\"");
+ $results = sql("UPDATE disa set displayname = \"".str_replace("\"", "\"\"",$displayname)."\", pin = \"$pin\", cid = \"".str_replace("\"", "\"\"",$cid)."\", context = \"$context\", resptimeout = \"$resptimeout\", digittimeout = \"$digittimeout\", needconf = \"$needconf\" where disa_id = \"$id\"");
}
?>
tara, your cookie probably
tara,
your cookie probably expired on the trac site. You need to logout of this main FreePBX site and then back in and you should be able to log a ticket on this. Please do so, thanks.
Philippe
Philippe Lindheimer - FreePBX Project Leader
FreePBX Training Opportunities - Click Here
Get Official Paid Support - Click Here
ticket
Ticket #2638
Thanks, I didn't realize the site was integrated, and I just created an account here so I could post, after I tried going thru the trac install.
With Love,
Tara