Facet Bot Blocker aims to mitigate the recent trend of aggressive bots crawling faceted search links. It allows an administrator to configure a "limit" for the number of facet filters used on a page, and a html page response. It uses an event subscriber listening for the early onKernelRequest event. If it detects a parameter for a facet that matches the limit, it will respond with the configured page instead of a rendered Drupal response. Here is a Forum discussion on the problem this module is trying to solve.
In the module, I attempt to minimize any database read/writes by caching it's configuration, and storing metrics of the number of blocks in a non-database cache back-end (I check if the memcache or redis modules are installed). I also provide a route to display these metrics to site admins.
I will admit that I leaned heavily into AI generated code on this one. It does make things convenient. But I myself have been a member of the Drupal community for over 13 years now, and spent that time working at agencies on several projects. I've also presented at Drupal Gov Con (Drupal4Gov) in 2015 (link), and DrupalCon Los Angeles in 2015 (link).
Thank you for your attention, and let me know if there is anything I can provide about myself, or the module.
Comments
Comment #2
vishal.kadamComment #3
vishal.kadamThank you for applying!
Please read Review process for security advisory coverage: What to expect for more details and Security advisory coverage application checklist to understand what reviewers look for. Tips for ensuring a smooth review gives some hints for a smoother review.
The important notes are the following.
Keep in mind that once the project is opted into security advisory coverage, only Security Team members may change coverage.
To the reviewers
Please read How to review security advisory coverage applications, Application workflow, What to cover in an application review, and Tools to use for reviews.
The important notes are the following.
For new reviewers, I would also suggest to first read In which way the issue queue for coverage applications is different from other project queues.
Comment #4
vishal.kadamRemember to change status, when the project is ready to be reviewed. In this queue, projects are only reviewed when the status is Needs review.
Comment #5
avpadernoI am closing this application because the status set by the applicant was Active, and the applicant has not posted any comment in this application in the past two weeks.
Feel free to re-open it, if you are the applicant and you are sure you can follow this application the time necessary to get it closed as fixed.
Comment #6
bburgApologies @avpaderno, I saw @vishal's first two comments, but I suppose I missed that I had to set the status in response to their last one. I still wish to pursue the opt in status if that works for you.
Comment #7
avpadernosrc/Controller/FacetBotBlockerDashboardController.php
Since that class does not use methods from the parent class, it does not need to use
ControllerBaseas parent class. Controllers do not need to have a parent class; as long as they implement\Drupal\Core\DependencyInjection\ContainerInjectionInterface, they are fine.src/Form/FacetBotBlockerSettingsForm.php
Since the form is used to change some configuration values, its base class should be ConfigFormBase, which also allows writing code similar to the following one.
Using that code, it is no longer needed to save the config values in the form submission handler: The parent class will take care of that.
src/EventSubscriber/FacetBotBlockerEventSubscriber.php
If
$blocked_messageis shown to end-users (including users with higher roles), it needs to be translated. Configuration values can be translatable too.Comment #8
vishal.kadamI am changing priority as per Issue priorities.
Comment #9
avpadernoThis thread has been idle, in the needs work state with no activity for some months.
May you confirm you are still pursuing this application? If this is the case, and you made commits basing on what previously reported, or you can answer the questions previously asked, please change the status to Needs review.
Comment #10
bburgI am still interested in this. Life has been busy, and time has just flown by. My apologies for not responding to the feedback sooner. I have some planned updates for this module I want to implement soon, and I will incorporate this feedback into that work.
Comment #11
avpadernoThis thread has been idle, in the Needs work state with no activity for about six months or more; the application has been created about 11 months ago or more. Therefore, I marked it as Closed (won't fix).
If this is incorrect, and you are still pursuing this application, please feel free to re-open it and set the issue status to Needs work or Needs review, depending on the current status of your code.