From b30c048bacb6c13d2dd7b776285f281fceac6c6d Mon Sep 17 00:00:00 2001 From: Daan Boerlage Date: Fri, 15 Apr 2022 10:33:09 +0100 Subject: [PATCH] Fix a bug where users could modify their own karma, because the user check was an object reference check rather than a user-id check --- src/Commands/Karma/Karma.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Commands/Karma/Karma.cs b/src/Commands/Karma/Karma.cs index 7cde07e..026af2f 100644 --- a/src/Commands/Karma/Karma.cs +++ b/src/Commands/Karma/Karma.cs @@ -25,7 +25,7 @@ public class Karma var authorRecord = await GetUser(long.Parse(author.Id)); // Check if the user can change karma - if (targetUser == author) + if (targetUser.Id == author.Id) { var message = change switch {