attachment permissions not right

This commit is contained in:
friendica
2013-07-30 19:43:46 -07:00
parent cb4d61e092
commit 41c411739f
2 changed files with 42 additions and 36 deletions

View File

@@ -193,13 +193,13 @@ function attach_by_hash($hash,$rev = 0) {
$sql_extra = permissions_sql($r[0]['uid']);
// Now we'll see if we can access the attachment
dbg(1);
$r = q("SELECT * FROM attach WHERE hash = '%s' and uid = %d $sql_extra LIMIT 1",
dbesc($hash),
intval($r[0]['uid'])
);
dbg(0);
if(! $r) {
$ret['message'] = t('Permission denied.');
return $ret;