Commit 78263a05 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Disallow voting on your own comment.

The validation relied on user_id field being available in comment
data, but this field was in fact missing, resulting in the comment author
to never equal current user.
parent f8f9fa17
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ module.exports = {
    commentToJson: function(comment) {
        return {
            _id: comment.id,
            user_id: comment.user_id,
            author: comment.username,
            target: this.targetToJson(comment),
            content: comment.content,