mirror of
https://github.com/friendica/friendica
synced 2024-12-23 19:20:17 +00:00
Adapt because of feedback
This commit is contained in:
parent
db25f5b6ca
commit
dba2d574b1
1 changed files with 3 additions and 4 deletions
|
@ -49,13 +49,12 @@ class Ignored extends BaseModule
|
||||||
case local_user():
|
case local_user():
|
||||||
$dba->update('thread', ['ignored' => $ignored], ['iid' => $message_id]);
|
$dba->update('thread', ['ignored' => $ignored], ['iid' => $message_id]);
|
||||||
break;
|
break;
|
||||||
// Empty or 0 (null will get transformed to 0) => it's a public post
|
// 0 (null will get transformed to 0) => it's a public post
|
||||||
case 0:
|
case 0:
|
||||||
case '':
|
|
||||||
$dba->update('user-item', ['ignored' => $ignored], ['iid' => $message_id, 'uid' => local_user()], true);
|
$dba->update('user-item', ['ignored' => $ignored], ['iid' => $message_id, 'uid' => local_user()], true);
|
||||||
break;
|
break;
|
||||||
// In case we retrieved a thread which isn't our or a public, it's a forbidden action
|
// Throws a BadRequestException and not a ForbiddenException on purpose
|
||||||
// but due to security reason (brute force), we print a Bad request exception
|
// Avoids harvesting existing, but forbidden IIDs (security issue)
|
||||||
default:
|
default:
|
||||||
throw new HTTPException\BadRequestException();
|
throw new HTTPException\BadRequestException();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue