add security fix to load case, too
This commit is contained in:
parent
4e9866f6b2
commit
ea511c67c7
@ -141,6 +141,9 @@ function channel_content(&$a, $update = 0, $load = false) {
|
|||||||
intval($a->profile['profile_uid']),
|
intval($a->profile['profile_uid']),
|
||||||
intval(ITEM_WALL)
|
intval(ITEM_WALL)
|
||||||
);
|
);
|
||||||
|
if (! $r) {
|
||||||
|
notice( t('Permission denied.') . EOL);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$r = q("SELECT distinct parent AS `item_id` from item
|
$r = q("SELECT distinct parent AS `item_id` from item
|
||||||
left join abook on item.author_xchan = abook.abook_xchan
|
left join abook on item.author_xchan = abook.abook_xchan
|
||||||
@ -177,11 +180,14 @@ function channel_content(&$a, $update = 0, $load = false) {
|
|||||||
|
|
||||||
if($load || ($_COOKIE['jsAvailable'] != 1)) {
|
if($load || ($_COOKIE['jsAvailable'] != 1)) {
|
||||||
if ($mid) {
|
if ($mid) {
|
||||||
$r = q("SELECT parent AS item_id from item where mid = '%s' limit 1",
|
$r = q("SELECT parent AS item_id from item where mid = '%s' and uid = %d AND item_restrict = 0
|
||||||
dbesc($mid)
|
AND (item_flags & %d) $sql_extra limit 1",
|
||||||
|
dbesc($mid),
|
||||||
|
intval($a->profile['profile_uid']),
|
||||||
|
intval(ITEM_WALL)
|
||||||
);
|
);
|
||||||
if (! $r) {
|
if (! $r) {
|
||||||
notice( t('Item not found.') . EOL);
|
notice( t('Permission denied.') . EOL);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user