more addslashes magic sauce

This commit is contained in:
Martin T. H. Sandsmark 2010-07-25 13:14:26 +02:00
parent 1f46d0fc7d
commit 3b065d4dae
1 changed files with 1 additions and 1 deletions

View File

@ -478,7 +478,7 @@ class OC_OCS {
//TODO: prepared statements, locking tables, fancy stuff, error checking/handling
$user=OC_OCS::checkpassword();
$result=OC_DB::select("select count(*) as co from {$CONFIG_DBTABLEPREFIX}privatedata where key = '".$key."'");
$result=OC_DB::select("select count(*) as co from {$CONFIG_DBTABLEPREFIX}privatedata where key = '".addslashes($key)."'");
$totalcount=$result[0]['co'];
OC_DB::free_result($result);