Utrecht
Account created on 26 April 2005, about 19 years ago
#

Merge Requests

Recent comments

🇳🇱Netherlands batigolix Utrecht

Yes, I agree. I missed this because I use the merge request option in the issue form.
It is more obvious to copy the correct commit message when you. do the commits on your local machine.

Apologies for this and I will try to credit you in the upcoming issues.

🇳🇱Netherlands batigolix Utrecht

Correct, when merging I did not check the authors. I followed up with a commit for the credits. Is that Okay for you?

🇳🇱Netherlands batigolix Utrecht

@ptmkenny : yes, that requirement would be great. So this should be added

It is OK to ignore phpstan for the moment. I ll make a new issue for that

🇳🇱Netherlands batigolix Utrecht

Sorry, I was not clear. Add Redis support Active also needs to be fixed.

🇳🇱Netherlands batigolix Utrecht

Given that the tests pass in gitlab I merge this issue

🇳🇱Netherlands batigolix Utrecht

Please do no update the patches in because they are outdated.

I put this issue on hold until Make FloodUnblockManager generic Active is fixed.

🇳🇱Netherlands batigolix Utrecht

@ELC: I created this issue for the phpunit test changes: 🐛 Fix phpunit tests Active

🇳🇱Netherlands batigolix Utrecht

I created an issue for the phpunit tests: 🐛 Fix phpunit tests Active

🇳🇱Netherlands batigolix Utrecht

batigolix created an issue.

🇳🇱Netherlands batigolix Utrecht

batigolix made their first commit to this issue’s fork.

🇳🇱Netherlands batigolix Utrecht

This should remove rows from database or redis storage.

Best to wait with this until
Make FloodUnblockManager generic Active and
Add Redis support Active are fixed

🇳🇱Netherlands batigolix Utrecht

batigolix made their first commit to this issue’s fork.

🇳🇱Netherlands batigolix Utrecht

I commit the patch from #7 and I credited everybody that provided patches and participated in the issue Support external Flood Postponed: needs info

All the additional proposed changes in the merge request https://git.drupalcode.org/project/flood_control/-/merge_requests/45 have not been committed. We need to create separate issues for that.

🇳🇱Netherlands batigolix Utrecht

The code in the patches in this issue is missing a lot of the improvements that were made in the last years (among them the new filter "Only blocked").

I explained this in #89

I created a new patch that includes all improvements (including the new filter "Only blocked") plus the code that makes the flood unblock generic. See Make FloodUnblockManager generic Active

There is an open issue for adding Redis support Add Redis support Active

🇳🇱Netherlands batigolix Utrecht

Thanks for this great feature.

I had some trouble understanding how it worked, so I think this needs a bit of documentation and some clearer UI texts.

I would change the label to:

"Ignore the following paths"

And I would change the description to:

"These paths will be ignored by subpathauto. Use for example '/node/*/edit' to ensure that subpathauto ignores the node edit path. You can use wilcards(*). Start each path with a forward slash '/'. Enter one path per line."

I've read you discussed how to name the list and you settled for Denylist. Would "Ignore list" not be a better name for this?

🇳🇱Netherlands batigolix Utrecht

@kvo_4x can you provide step by step instructions on how to replicate this error?

🇳🇱Netherlands batigolix Utrecht

Would it be possible to explain in the documentation how this plugin can be used?

Is it as follows in a migration yml?:

id: files
label: My files
destination:
  plugin: devel_null

@joachim : you still think this plugin is useful in this contrib module or can the Core plugin 🐛 The "null" migration destination plugin can't be used Active be used instead?

🇳🇱Netherlands batigolix Utrecht

Here is a new patch rerolled after the PHPCS fixes

🇳🇱Netherlands batigolix Utrecht

Here is a new patch that also adds labels for Term select and Term checkbox elements.

🇳🇱Netherlands batigolix Utrecht

Tis is looking good, but

Maybe we use different PHPCS settings so I still get warnings:

FILE: /var/www/html/web/modules/contrib/webform_analysis/src/Form/WebformAnalysisForm.php
-----------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------
122 | ERROR | [x] Use null coalesce operator instead of ternary operator.
-----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------

FILE: /var/www/html/web/modules/contrib/webform_analysis/src/WebformAnalysisInterface.php
-----------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
-----------------------------------------------------------------------------------------
5 | WARNING | [x] Unused use statement
138 | ERROR | [x] Data types in @return tags need to be fully namespaced
154 | ERROR | [x] Data types in @return tags need to be fully namespaced
-----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------

FILE: /var/www/html/web/modules/contrib/webform_analysis/src/WebformAnalysis.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
55 | ERROR | [x] list(...) is forbidden, use [...] instead.
161 | ERROR | [x] Use null coalesce operator instead of ternary operator.
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

🇳🇱Netherlands batigolix Utrecht

I tested and committed this

🇳🇱Netherlands batigolix Utrecht

batigolix created an issue.

🇳🇱Netherlands batigolix Utrecht

Looks good to me.

🇳🇱Netherlands batigolix Utrecht

I announced splitting this issue in this comment:
https://www.drupal.org/project/flood_control/issues/2928007#comment-1553... Support external Flood Postponed: needs info

I would prefer to keep this in a separate issue, to keep the conversation focused on a smaller topic and make it easier to review.

I ll try to ensure that people are being credited and notified.

🇳🇱Netherlands batigolix Utrecht

I tested this with a custom entity and Country as a base field.

The problem does not occur anymore.

🇳🇱Netherlands batigolix Utrecht

Let us keep tests, CI, and static code checking out of this issue and fix all of that in follow up issues.

🇳🇱Netherlands batigolix Utrecht

Ok, then I close this issue as duplicate

🇳🇱Netherlands batigolix Utrecht

This is a first stab at it

🇳🇱Netherlands batigolix Utrecht

A a maintainer, I have been monitoring this issue for a while.

I think that there are still major problems with this patch:
- Code has been copied in the past from FloodUnblockManager to new classes (FloodUnblockManagerBase & FloodUnblockManagerDatabase). After that moment FloodUnblockManagerBase was changed and improved, but those changes were not transferred to the code in FloodUnblockManagerBase & FloodUnblockManagerDatabase, resulting in the code in those files to miss certain features and improvements. The same happened with code that was copied from FloodUnblockAdminForm.php
- Having a default manager that is 'unknown' is confusing to me. We better assume that we have a database connection and make the original Manager the
default again. In that case we don't need FloodUnblockManagerUnknown.php

I propose to introduce the External Flood Support in two steps, using 2 different issues:
- 1. Add the generic FloodUnblockManager. This will be achieved by adding the generic FloodUnblockManagerBase and the database specific FloodUnblockManagerDatabase. This should be done while ensuring that everything keeps functioning as it does in the latest release.
Make FloodUnblockManager generic Active
- 2. Add the Redis FloodUnblockManager. This will be achieve by adding the FloodUnblockManagerRedis
Add Redis support Active

🇳🇱Netherlands batigolix Utrecht

batigolix created an issue.

🇳🇱Netherlands batigolix Utrecht

I tested this and it works now. I committed this.

Thanks everybody for their help

🇳🇱Netherlands batigolix Utrecht

If I go to /admin/structure/types/manage/article/form-display and switch from the Default Widget to the Autocomplete Widget, then I get this error:

TypeError: Drupal\Core\Field\WidgetBase::__construct(): Argument #5 ($third_party_settings) must be of type array, null given, called in /var/www/html/web/modules/contrib/country/src/Plugin/Field/FieldWidget/CountryAutocompleteWidget.php on line 63 in Drupal\Core\Field\WidgetBase->__construct() (line 50 of /var/www/html/web/core/lib/Drupal/Core/Field/WidgetBase.php).

🇳🇱Netherlands batigolix Utrecht

Here is a first stab at it

🇳🇱Netherlands batigolix Utrecht

I tested this. With this new options I am able to filter submissions in the webform analysis.

🇳🇱Netherlands batigolix Utrecht

In case someone needs a default value when using the migration_lookup plugin: This is the work around that I am using:

  eid_lookup:
    plugin: migration_lookup
    source: user
    no_stub: true
    migration: user
  entity_id:
    plugin: default_value
    source: '@eid_lookup'
    default_value: 1
🇳🇱Netherlands batigolix Utrecht

web/core/lib/Drupal/Core/Flood/FloodInterface.php says the following about this:

   * @param int $window
   *   (optional) Number of seconds in the time window for this event (default is 3600
   *   seconds, or 1 hour).

   * @param int $threshold
   *   The maximum number of times each user can do this event per time window.

So regarding your question:

Is this the time after the IP adres login limit is passed? I have the number of limits set to 5 and window 1 hour. So in this case: after 5 failes login attempts you cannot use this IP adres for 1 hour any more?
Or is it that the 5 times login in is counted within 1 hour?

It is the second: the time in which you are allowed to do an action (e.g. login with wrong password):
So 5 wrong password attempts in an hour will put you in the flood list and further attempts are being blocked.

Yes, I am all in favour of adding more and better help text (also for all the other fields) and a better readme.

Feel free to create a patch.

🇳🇱Netherlands batigolix Utrecht

I leave it open for further updates.

Production build 0.69.0 2024