Commit 8d5dd578 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 355230: [PostgreSQL] Crash if sharer_id is not an integer - Patch by…

Bug 355230: [PostgreSQL] Crash if sharer_id is not an integer - Patch by Frédéric Buclin <LpSolit@gmail.com> r=wurblzap a=myk
parent 11be7258
...@@ -221,8 +221,9 @@ sub LookupNamedQuery { ...@@ -221,8 +221,9 @@ sub LookupNamedQuery {
$name || ThrowUserError("query_name_missing"); $name || ThrowUserError("query_name_missing");
trick_taint($name); trick_taint($name);
if ($sharer_id) { if ($sharer_id) {
trick_taint($sharer_id);
$owner_id = $sharer_id; $owner_id = $sharer_id;
detaint_natural($owner_id);
$owner_id || ThrowUserError('illegal_user_id', {'userid' => $sharer_id});
} }
else { else {
$owner_id = $user->id; $owner_id = $user->id;
......
...@@ -966,7 +966,7 @@ ...@@ -966,7 +966,7 @@
[% docslinks = {'query.html' => "Searching for $terms.bugs", [% docslinks = {'query.html' => "Searching for $terms.bugs",
'list.html' => "$terms.Bug lists"} %] 'list.html' => "$terms.Bug lists"} %]
The search named <em>[% queryname FILTER html %]</em> The search named <em>[% queryname FILTER html %]</em>
[% IF sharer_id %] [% IF sharer_id && sharer_id != user.id %]
has not been made visible to you. has not been made visible to you.
[% ELSE %] [% ELSE %]
does not exist. does not exist.
...@@ -1521,8 +1521,10 @@ ...@@ -1521,8 +1521,10 @@
# search from any error call location. %] # search from any error call location. %]
[% namedcmd = Bugzilla.cgi.param("namedcmd") %] [% namedcmd = Bugzilla.cgi.param("namedcmd") %]
[% sharer_id = Bugzilla.cgi.param("sharer_id") %]
[% IF namedcmd AND error != "missing_query" [% IF namedcmd AND error != "missing_query"
AND error != "saved_search_used_by_whines" %] AND error != "saved_search_used_by_whines"
AND !sharer_id %]
<p> <p>
Alternatively, you can Alternatively, you can
<a href="buglist.cgi?cmdtype=dorem&amp;remaction=forget&amp;namedcmd= <a href="buglist.cgi?cmdtype=dorem&amp;remaction=forget&amp;namedcmd=
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment