תודה שהצבעת על כך. רק כדי להבהיר, מה שם הגדרת האתר הנסתר? והאם היא משביתה לחלוטין את החיפוש עבור משתמשים אנונימיים, או רק מסתירה את התוצאות? אני מחפש דרך לחסום גישה ברמת הבקר (controller), אז תוהה אם ההגדרה הזו לבדה מספיקה או שעדיין נדרש קוד מותאם אישית.
Now the /search page is unreachable = great
Now the front end search button instantly returns : you’ve performed this action too many times = great
You may hide the search button with :
But the question is : is this thorough? Can anyone just create a simple session cookie to make it look like they are connected so that they can access the content of the site through searches?
More thorough but uncomplete solution :
The file is : /var/www/discourse/app/controllers/search_controller.rb
The modification : add “if current_user.present?” after “def show” and add an “end” at the bottom of the condition.
However I could not make it persistent after restart, so anybody is welcome to tell how to make it persistent after restart with the app.yml hooks after_code replace: feature.
אני מתכוון למשתמש שאינו מחובר, שיצור עוגיית סשן כדי להתחזות למחובר, אבל אולי אני חושב רחוק מדי כאן, כיוון שאני מניח שפונקציית currentUser בודקת את מפתח הסשן.
" That would be a security issue. If you can achieve that make sure to report to HackerOne"
No, I am new to discourse, I cannot even quote properly , I was just asking, maybe there was some discourse engineer around ; anyway, we got our solution to this thread thanks to you Falco
but feel free to try this at the controller level:
/var/www/discourse/app/controllers/search_controller.rb
The modification: add "if current_user.present?" after "def show" and add an "end" at the bottom of the condition.