diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/message.php | 6 | ||||
-rw-r--r-- | include/text.php | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/message.php b/include/message.php index 3f003e020..477c7172c 100644 --- a/include/message.php +++ b/include/message.php @@ -381,7 +381,7 @@ function private_messages_list($uid, $mailbox = '', $start = 0, $numitems = 0) { $chans[] = $s; } - $c = q("select * from xchan where xchan_hash in (" . implode(',',$chans) . ")"); + $c = q("select * from xchan where xchan_hash in (" . protect_sprintf(implode(',',$chans)) . ")"); foreach($r as $k => $rr) { $r[$k]['from'] = find_xchan_in_array($rr['from_xchan'],$c); @@ -420,7 +420,7 @@ function private_messages_fetch_message($channel_id, $messageitem_id, $updatesee $chans[] = $s; } - $c = q("select * from xchan where xchan_hash in (" . implode(',',$chans) . ")"); + $c = q("select * from xchan where xchan_hash in (" . protect_sprintf(implode(',',$chans)) . ")"); foreach($messages as $k => $message) { $messages[$k]['from'] = find_xchan_in_array($message['from_xchan'],$c); @@ -545,7 +545,7 @@ function private_messages_fetch_conversation($channel_id, $messageitem_id, $upda } - $c = q("select * from xchan where xchan_hash in (" . implode(',',$chans) . ")"); + $c = q("select * from xchan where xchan_hash in (" . protect_sprintf(implode(',',$chans)) . ")"); foreach($messages as $k => $message) { $messages[$k]['from'] = find_xchan_in_array($message['from_xchan'],$c); diff --git a/include/text.php b/include/text.php index d81b59d75..746c35679 100644 --- a/include/text.php +++ b/include/text.php @@ -2160,7 +2160,7 @@ function xchan_mail_query(&$item) { if(count($arr)) { $chans = q("select xchan.*,hubloc.* from xchan left join hubloc on hubloc_hash = xchan_hash - where xchan_hash in (" . implode(',', $arr) . ") and hubloc_primary = 1"); + where xchan_hash in (" . protect_sprintf(implode(',', $arr)) . ") and hubloc_primary = 1"); } if($chans) { $item['from'] = find_xchan_in_array($item['from_xchan'],$chans); |