mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 02:34:28 +08:00
SECURITY: only show user suggestions with regular post (#15436)
This commit is contained in:
@ -83,7 +83,7 @@ class UserSearch
|
||||
# 2. in topic
|
||||
if @topic_id
|
||||
in_topic = filtered_by_term_users
|
||||
.where('users.id IN (SELECT user_id FROM posts WHERE topic_id = ?)', @topic_id)
|
||||
.where('users.id IN (SELECT user_id FROM posts WHERE topic_id = ? AND post_type = ?)', @topic_id, Post.types[:regular])
|
||||
|
||||
if @searching_user.present?
|
||||
in_topic = in_topic.where('users.id <> ?', @searching_user.id)
|
||||
|
Reference in New Issue
Block a user