- Issue created by @primsi
- Status changed to Needs review
about 1 year ago 2:15pm 19 October 2023 - Status changed to Needs work
about 1 year ago 3:25pm 19 October 2023 - 🇨🇭Switzerland berdir Switzerland
+++ b/auto_unban.module @@ -82,3 +90,24 @@ function auto_unban_form_ban_ip_form_alter(array &$form, FormStateInterface $for + $time = \Drupal::time(); + // Ban for as much as the db field allows us. + $ip_manager->setBanDurationOverride(2147483647 - $time->getCurrentTime()); + $ip_manager->banIp($ip);
I think if we go with a separate submit button then a new method that's banIpIndefinitely() or banIpWithExpire() makes more sense, we don't need to introduce state in the storage then.
- Status changed to Needs review
about 1 year ago 7:15am 20 October 2023 - 🇸🇮Slovenia primsi
Thanks. Seems it's fine even with just a new argument (that's what the module is doing anyway with $attempts).
- 🇸🇮Slovenia primsi
Few notes for the maintainer:
-
+++ b/auto_unban.module @@ -1,5 +1,6 @@ +use Drupal\auto_unban\BanIpManager as AutoUnbanBanIpManager;
I aliased this for a bit better code clarity, because the replacement class auto_unban provides has the same name as the one that it substitutes.
-
+++ b/auto_unban.module @@ -15,7 +24,7 @@ function auto_unban_form_ban_ip_form_alter(array &$form, FormStateInterface $for + 'data' => t('Ban count'),
We discussed with @Berdir, that just Count is a bit confusing. So we are proposing here a small renaming. Sorry for the scope creep.
-
- Status changed to RTBC
about 1 year ago 4:39pm 4 January 2024 - 🇬🇧United Kingdom andybroomfield
Have tested this and selecting add indefinatly does ban the IP address with a date set to 2038 (max unix time stamp).
-
douggreen →
committed 748cde0c on 1.0.x
Issue #3395292: Add option to ban indefinitely (sort of)
-
douggreen →
committed 748cde0c on 1.0.x
- 🇺🇸United States douggreen Winchester, VA
Committed, I wasn't initially a fan of this, but as an option it's certainly valuable.
Automatically closed - issue fixed for 2 weeks with no activity.