From a47bc2544e2e1b51f161a2156f3ba7a305e24ca3 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 19 Nov 2020 01:17:46 +0300 Subject: Fix blacklist checking when commenting over API --- src/main/java/com/juick/www/api/Post.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/com/juick/www/api/Post.java b/src/main/java/com/juick/www/api/Post.java index c94c7b30..c993ebe3 100644 --- a/src/main/java/com/juick/www/api/Post.java +++ b/src/main/java/com/juick/www/api/Post.java @@ -129,8 +129,8 @@ public class Post { } if ((msg.ReadOnly && msg.getUser().getUid() != visitor.getUid()) - || userService.isInBLAny(msg.getUser().getUid(), visitor.getUid()) - || (reply != null && userService.isInBLAny(reply.getUser().getUid(), visitor.getUid()))) { + || userService.isInBL(visitor.getUid(), msg.getUser().getUid()) + || (reply != null && userService.isInBL(visitor.getUid(), reply.getUser().getUid()))) { // TODO: validator throw new HttpForbiddenException(); } -- cgit v1.2.3