fix issues with diaspora xchans

This commit is contained in:
Mario Vavti
2017-11-02 08:44:46 +01:00
parent 11cdc36bcc
commit cdaf5f3fc0
3 changed files with 6 additions and 6 deletions

View File

@@ -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);