The request subscriber should properly check admin paths and user roles before executing the spam prevention checks:
- https://git.drupalcode.org/project/cleantalk/-/blob/9.1.x/src/EventSubsc...
- https://git.drupalcode.org/project/cleantalk/-/blob/9.1.x/src/CleantalkF...
Subscribing to the http_middleware is too soon as current_user service & request routing context is not fully loaded.
Replacing it with a regular request subscriber solves this issue.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 3260607-8.patch | 25.86 KB | bceyssens |
| #7 | 3260607-7.patch | 25.75 KB | bceyssens |
| #2 | 3260607-2.patch | 25.75 KB | bceyssens |
Comments
Comment #2
bceyssensComment #3
serge-m commentedHello.
Thank you for opening an issue.
We will investigate the issue as soon as possible and contact you when we get any results. It may take up to 5 business days. Please, wait.
Your CleanTalk Control Panel: [ https://cleantalk.org/my/ ].
Best regards.
Comment #4
znaeff commentedWell, it seems a good idea. We will take it in the next stable release.
Thank you!
Comment #5
gaurav.kapoor commentedThe patch isn't working with the latest 9.1.x branch. Also,
Comment #6
serge-m commentedHello.
We plan to implement the fixes within 3 months. Please, wait.
Thank you.
Comment #7
bceyssensI agree with @gaurav.kapoor that the code needs some improvements. For now I'm only trying to fix the issue.
Comment #8
bceyssensAdding following code to only execute on POST requests.
Comment #9
znaeff commentedHello.
This issue has been resolved in release 9.2.2.