Skip to Content Skip to Menu

CB antispam captcha issue

  • krileon
  • krileon
  • ONLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
2 years 3 days ago #331206 by krileon
Replied by krileon on topic CB antispam captcha issue
The call to CB AntiSpam to get the captcha image fails when the response is from the service worker. Looks like the response from the actual HTTP call works fine. The service worker should not be caching CB AntiSpam. You can't cache generated captcha images. Is there a setting in your plugin to ignore specified URLs?

HTTP Request
 

Service Worker Request
 


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • activha
  • activha
  • OFFLINE
  • Posts: 2326
  • Thanks: 117
  • Karma: 13
2 years 3 days ago #331207 by activha
Replied by activha on topic CB antispam captcha issue
yes it's was already set to ignore registration url

It may be that the call to the captcha image is seen as another page which is then cached by default.

I already switched from cache first to network first to check the behavior.

 What expression can I add to ignore such call ? something like index.php?option=com_comprofiler&view=pluginclass&plugin=cbantispam&action=captcha&func=load ?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
2 years 3 days ago #331208 by krileon
Replied by krileon on topic CB antispam captcha issue
It should ignore all calls to the following.

option=com_comprofiler&view=pluginclass&plugin=cbantispam&action=captcha

I assume it matches partial URLs so this will prevent all of the captcha URLs from being cached. You should do the same for Google reCaptcha URL as well (it really should not be caching external URLs to begin with though).


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • activha
  • activha
  • OFFLINE
  • Posts: 2326
  • Thanks: 117
  • Karma: 13
2 years 3 days ago #331215 by activha
Replied by activha on topic CB antispam captcha issue
It seems more complicated than a cache issue.In fact the registration page and the url have been marked as not cached, but this does not prevent the service worker to fetch all urls from everywhere.This is the nature SW do workThe issue is that the url responds with text/html and not with image/png.Is there a way to force CB antispam url to respond with image/png ?I have attached the service worker js if you want to have a look. This works fine for every requests except CB captcha plugin.
Attachments:

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
2 years 3 days ago #331219 by krileon
Replied by krileon on topic CB antispam captcha issue
CB AntiSpam captcha is one of the few if not only URLs in CB that cannot be cached for obvious reasons. Suggest contacting the developer of your extension regarding why the feature to ignore URLs is not working.

I have no idea why you're so fixated on the response type. It's responding with text/html because you're using ajax mode which doesn't pre-render the captcha. It renders it after retrieving it with an ajax request which works by responding with the HTML to render the captcha. The URL to the image itself has the proper image response type. You can see in my screenshot 1 HTTP call above the image HTTP call and that's the text/html one to retrieve the captcha HTML.

The issue is not CB AntiSpam. It's your service worker plugin, which also breaks Google reCaptcha with callback functions. There's nothing more I can suggest. If the issue persists after completely disabling your PWA stuff then I can investigate further, but at this time there's nothing more I can do.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • activha
  • activha
  • OFFLINE
  • Posts: 2326
  • Thanks: 117
  • Karma: 13
2 years 3 days ago #331220 by activha
Replied by activha on topic CB antispam captcha issue
Not sure it could even be a cache issue as the SW is configured to be network first. It only revert to cache if network fails.

This issue may arise with all SW use or software in this case.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum