Prevent the manipulation of search keyword suggestions
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Start by tracing SearchHandler::saveKeywordSuggestion() to SearchKeywordAction::registerSearch(), then inspect SearchKeywordAction::getSearchResultList() and the existing keyword storage. Determine how the application identifies guests and users and how it persists per-user search history; the issue does not name those files or tests. Done means guests still search without recording keywords and each registered user's keyword is counted only once.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
Every search query is recorded in wcf1_search_keyword via SearchKeywordAction::registerSearch(). It is called from SearchHandler::saveKeywordSuggestion() and the searches counter goes up by one each time. The data is used for
the keyword suggestions in the search (SearchKeywordAction::getSearchResultList(), ordered by searches DESC).
Nothing limits who can register a keyword or how often, so the suggestions are easy to manipulate:
- Guests can submit any number of searches without authentication, for example from a script, and push arbitrary terms (spam, offensive content, advertising) to the top of the suggestions shown to everyone.
- A single registered user can raise a keyword's counter without limit just by repeating the same search.
The daily cleanup in DailyCleanUpCronjob only removes rarely used keywords and does nothing against inflated counters.
Proposed solution
- Do not record keywords for guests. registerSearch() should not be called at all for guests. Searches by guests still work as before, they just no longer affect the suggestions.
- Count each keyword only once per user. A user's repeated searches for the same keyword must not raise searches again. This needs a way to track which user has already searched for which keyword.
- Ngôn ngữ chính
- PHP
- Star
- 248
- Fork
- 147
- Merge trung bình
- 17 phút
- Pull request đã merge (30 ngày)
- 21
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của WoltLab/WCF
-
Problems with button inputSuffixĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Breadcrumb colors are confusingĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 58/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
WoltLab/WCF#6771 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
HE-Arc/le-panier-du-coin#49 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
15.0
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
bug: juros do parcelamento travados em 1x no gateway Rede Débito e Crédito 3DS (woo-rede 5.6.0)Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
LinkNacional/woo-rede#367 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Lazyload SVG placeholder runs uncached attachment lookups with JSON-escaped URLs on REST responsesĐang mởcustomer report
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Codeinwp/optimole-wp#1253 ·
Maintainer thường phản hồi trong vòng 1 ngày