]> git.mxchange.org Git - friendica.git/commitdiff
Adapt because of feedback
authorPhilipp Holzer <admin+github@philipp.info>
Wed, 23 Oct 2019 19:29:17 +0000 (21:29 +0200)
committerPhilipp Holzer <admin+github@philipp.info>
Wed, 23 Oct 2019 19:29:17 +0000 (21:29 +0200)
src/Module/Item/Ignored.php

index c629b0d2e94228e6d1944607c23c251879d25824..f37c5ab3a7f0251f538dc5caa919ea13a7cca10d 100644 (file)
@@ -49,13 +49,12 @@ class Ignored extends BaseModule
                        case local_user():
                                $dba->update('thread', ['ignored' => $ignored], ['iid' => $message_id]);
                                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 '':
                                $dba->update('user-item', ['ignored' => $ignored], ['iid' => $message_id, 'uid' => local_user()], true);
                                break;
-                       // In case we retrieved a thread which isn't our or a public, it's a forbidden action
-                       // but due to security reason (brute force), we print a Bad request exception
+                       // Throws a BadRequestException and not a ForbiddenException on purpose
+                       // Avoids harvesting existing, but forbidden IIDs (security issue)
                        default:
                                throw new HTTPException\BadRequestException();
                }