Skip to content

Commit

Permalink
fix(security): Correct SQL injection in freedomrss_search.php (refs #…
Browse files Browse the repository at this point in the history
…6439)
  • Loading branch information
eguaj committed Jun 9, 2016
1 parent 837ce01 commit 750a9b3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions dynacase-webdesk-ui/Actions/WEBDESK/freedomrss_search.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ function freedomrss_search(Action & $action)
$user = GetHttpVars("user", $action->user->id);
$lim = 10;

$filter[0] = "(title ~* '" . pg_escape_string($str) . "')";
$filter[0] = "(title ~* " . pg_escape_literal($str) . ")";
$filter[1] = "(gui_isrss = 'yes')";
if ($sys == 1) $filter[2] = "(owner = " . pg_escape_string($user) . " or gui_sysrss = 'yes')";
else $filter[2] = "(owner = " . pg_escape_string($user) . ")";
if ($sys == 1) $filter[2] = "(owner = " . pg_escape_literal($user) . " or gui_sysrss = 'yes')";
else $filter[2] = "(owner = " . pg_escape_literal($user) . ")";

$famids = array(
"SEARCH",
Expand Down Expand Up @@ -67,4 +67,3 @@ function rssGetFamTitle($id)
if (isset($t["title"])) return $t["title"];
return "Family $id";
}
?>

0 comments on commit 750a9b3

Please sign in to comment.