projects
/
GitHub
/
WoltLab
/
WCF.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9098dfe
)
Prevent guests from being a comment’s content author
author
Tim Düsterhus
<duesterhus@woltlab.com>
Mon, 10 Aug 2020 10:01:43 +0000
(12:01 +0200)
committer
Tim Düsterhus
<duesterhus@woltlab.com>
Mon, 10 Aug 2020 10:01:43 +0000
(12:01 +0200)
wcfsetup/install/files/lib/system/comment/manager/ArticleCommentManager.class.php
patch
|
blob
|
blame
|
history
wcfsetup/install/files/lib/system/comment/manager/UserProfileCommentManager.class.php
patch
|
blob
|
blame
|
history
diff --git
a/wcfsetup/install/files/lib/system/comment/manager/ArticleCommentManager.class.php
b/wcfsetup/install/files/lib/system/comment/manager/ArticleCommentManager.class.php
index d3b7de04b8697bf77b469c59eb0be53598ed0224..5a0b97a36d483bbc887c3defe5bab56358d838b7 100644
(file)
--- a/
wcfsetup/install/files/lib/system/comment/manager/ArticleCommentManager.class.php
+++ b/
wcfsetup/install/files/lib/system/comment/manager/ArticleCommentManager.class.php
@@
-215,6
+215,6
@@
class ArticleCommentManager extends AbstractCommentManager implements IViewableL
*/
public function isContentAuthor($commentOrResponse) {
$article = ViewableArticleRuntimeCache::getInstance()->getObject($this->getObjectID($commentOrResponse));
- return $article->userID == $commentOrResponse->userID;
+ return $
commentOrResponse->userID && $
article->userID == $commentOrResponse->userID;
}
}
diff --git
a/wcfsetup/install/files/lib/system/comment/manager/UserProfileCommentManager.class.php
b/wcfsetup/install/files/lib/system/comment/manager/UserProfileCommentManager.class.php
index 2675092639b24cc54a44d90aacc8f7d9959495ab..ae9aaccc0d831442b424d8a8a108f0a77e918f24 100644
(file)
--- a/
wcfsetup/install/files/lib/system/comment/manager/UserProfileCommentManager.class.php
+++ b/
wcfsetup/install/files/lib/system/comment/manager/UserProfileCommentManager.class.php
@@
-257,6
+257,6
@@
class UserProfileCommentManager extends AbstractCommentManager implements IViewa
*/
public function isContentAuthor($commentOrResponse) {
$userID = $this->getObjectID($commentOrResponse);
- return $userID == $commentOrResponse->userID;
+ return $
commentOrResponse->userID && $
userID == $commentOrResponse->userID;
}
}