Bug 355230: [PostgreSQL] Crash if sharer_id is not an integer - Patch by Frédéric Buclin <LpSolit@gmail.com> r=wurblzap a=myk

git-svn-id: svn://10.0.0.236/trunk@213115 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
lpsolit%gmail.com
2006-10-04 19:47:28 +00:00
parent 71b9a871a1
commit 38517ea115
2 changed files with 6 additions and 3 deletions

View File

@@ -221,8 +221,9 @@ sub LookupNamedQuery {
$name || ThrowUserError("query_name_missing");
trick_taint($name);
if ($sharer_id) {
trick_taint($sharer_id);
$owner_id = $sharer_id;
detaint_natural($owner_id);
$owner_id || ThrowUserError('illegal_user_id', {'userid' => $sharer_id});
}
else {
$owner_id = $user->id;