Verify that the conversation is readable in Conversation::canReply()
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 18 Jan 2022 14:47:53 +0000 (15:47 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 18 Jan 2022 14:47:53 +0000 (15:47 +0100)
files/lib/data/conversation/Conversation.class.php

index 6f57567ecdbdc1d6e2b145685a2ee37ea5de674a..c553c2c6d746ca484d54bddd4334cf9a190b2b32 100644 (file)
@@ -144,6 +144,10 @@ class Conversation extends DatabaseObject implements IPopoverObject, IRouteContr
      */
     public function canReply()
     {
+        if (!$this->canRead()) {
+            return false;
+        }
+
         return !$this->isClosed && !$this->leftAt && WCF::getSession()->getPermission('user.conversation.canReplyToConversation');
     }