- Issue created by @primsi
- Status changed to Needs review
about 1 year ago 9:17am 19 October 2023 - last update
about 1 year ago 2 pass - Status changed to Needs work
about 1 year ago 10:56am 19 October 2023 - 🇨🇭Switzerland berdir Switzerland
+++ b/src/EventSubscriber/PerimeterSubscriber.php @@ -58,12 +73,15 @@ class PerimeterSubscriber implements EventSubscriberInterface { - public function __construct(LoggerChannelFactoryInterface $logger_factory, ConfigFactoryInterface $config_factory, AccountProxyInterface $current_user, BanIpManagerInterface $ban_manager) { + public function __construct(LoggerChannelFactoryInterface $logger_factory, ConfigFactoryInterface $config_factory, AccountProxyInterface $current_user, BanIpManagerInterface $ban_manager, FloodInterface $flood) { $this->loggerFactory = $logger_factory; $this->configFactory = $config_factory; $this->currentUser = $current_user; $this->banManager = $ban_manager; + $this->flood = $flood; }
to avoid early bootstrap errors and problems with subclasses and so on, I'd suggest making the argument optional with a fallback to \Drupal::service().
- Status changed to Needs review
about 1 year ago 2:26pm 19 October 2023 - last update
about 1 year ago 2 pass - last update
about 1 year ago 2 pass - Status changed to RTBC
about 1 year ago 12:24am 29 October 2023 - 🇸🇪Sweden alayham
Tested this patch on a live site, and got myself banned multiple times. This patch works.
- last update
about 1 year ago Patch Failed to Apply - last update
about 1 year ago 9 pass - Status changed to Needs review
about 1 year ago 8:36pm 25 November 2023 - 🇸🇪Sweden alayham
I created a MR for this patch, and added two tests for the new configurations.
- Status changed to Needs work
11 months ago 10:50am 10 January 2024 - Status changed to Needs review
11 months ago 4:22pm 17 January 2024 - 🇸🇮Slovenia primsi
I rebased. There is one more thing that @Berdir noticed: perimeter_honeypot_reject() needs to use the service instead of the class.
- Status changed to Needs work
10 months ago 7:30am 30 January 2024 - 🇨🇭Switzerland berdir Switzerland
Left a comment. As written, my point point about perimeter_honeypot_reject() is that it needs to use the same flood behaviour.
- Status changed to Needs review
10 months ago 5:17pm 10 February 2024 - 🇨🇭Switzerland berdir Switzerland
Added that. Wasn't sure if it should use the same flood key or not, but then it should probably just be perimeter.
- 🇩🇪Germany Anybody Porta Westfalica
Just took a look and LGTM! I'll ask @Grevil to review it finally. Thanks @Berdir, great work as always!
- Assigned to Grevil
- 🇩🇪Germany Anybody Porta Westfalica
Let's make this major as it would be very useful to the modules functionality. Especially being able to not block at first wrong access.
- First commit to issue fork.
- Status changed to Needs work
3 months ago 1:06pm 23 August 2024 - 🇩🇪Germany Grevil
Seems that ✨ Make perimeter compatible with fast404 module and use DI for ban.ip_manager Fixed causes handleBannedUrls() being called twice and therefore messing up the threshold logic.
- 🇩🇪Germany Grevil
Alright, going to finish this on Monday, just added a few comments for myself.
- 🇩🇪Germany Grevil
Note, the method being called twice is fixed in 🐛 "handleBannedUrls()" is executed twice on 404 pages Active .
- 🇩🇪Germany Grevil
I have no idea, why the tests fail...
After some debugging, I find that "onKernelException" is only executed on the first "drupalGet()" inside the tests for some reason.
I can not replicate this issue locally...
- Issue was unassigned.
- 🇨🇭Switzerland berdir Switzerland
drupalGet() doesn't expect have a leading /, try without that. Tests there run in a subfolder, that might end up outside of Drupal.
- 🇨🇭Switzerland berdir Switzerland
The other thing is caching. It should be consistent in a test, but I'd expect that multiple requests to the same URL would end up in page cache. I'd suggest using different unique URL's.
- 🇩🇪Germany Anybody Porta Westfalica
I removed the leading slahes, let's see what happens, so you'll have a result tomorrow!
- Status changed to Needs review
3 months ago 3:10pm 26 August 2024 - Status changed to Needs work
3 months ago 7:31pm 26 August 2024 - 🇨🇭Switzerland berdir Switzerland
Reviewed and verified the test fails are due to caching.
- Status changed to Needs review
3 months ago 8:04am 27 August 2024 - 🇩🇪Germany Grevil
All tests are green now! Setting back to "Needs Review" for reviewing final changes.
- Status changed to RTBC
3 months ago 12:21pm 27 August 2024 - Status changed to Fixed
3 months ago 12:27pm 27 August 2024 Automatically closed - issue fixed for 2 weeks with no activity.
- 🇯🇵Japan ilfelice
Howdy,
Awesome module!
Is this fix included in the latest release (3.0.4/28 August 2024)?
- 🇩🇪Germany Grevil
Indeed! The MR title was incorrect, so it doesn't properly show up in the change notes.