"You can't request more than @num challenges without solving them..."

tille - January 24, 2008 - 23:09
Project:CAPTCHA
Version:6.x-1.x-dev
Component:User interface
Category:bug report
Priority:normal
Assigned:soxofaan
Status:closed
Description

I just recently witnessed a strange error message popping up in one instllation every now and then: "You can't request more than @num challenges without solving them. Your previous challenges were flushed."
In my case it was actually "You can't request more than 20 challenges without solving them..." but I found that @num from the locale module..

I am actually not 100% sure if this is a CAPTCHA related thing - but I somewhere (http://scottsigler.com/node/639) found a hint that it might be CAPTCHA related - and "challenge" seems to be a typical CAPTCHA-term.. so I thought I first try here. Of course it could also be any other module and since that website uses some modules (five star, top node, comment notify, etc) it is not easy for me..

..I hope somebody can tell me what this is about - and how/ where I can edit the setup so that thie "error" is not shown anymore..?

thanks in advance! greetz! till..

#1

samo - January 25, 2008 - 02:36
Title:strange message:" You can't request more than @num challenges without solving them..."» "You can't request more than @num challenges without solving them..."
Category:support request» bug report

Anonymous browsing of a site can result in this error message.

To replicate:

1) Ensure that the comment form is displayed on every node.

2) Ensure that captcha is displayed on the comment form.

3) Browse 20 pages on the site.

To remove the error message, simply disable the drupal_set_message in captcha.module.

Is there a better, long-term solution for this issue?

#2

soxofaan - January 25, 2008 - 08:58
Category:bug report» support request

First: it is indeed a CAPTCHA thing

Second: the flushing of challenges is meant to avoid unlimited filling of your sessions database table. Every time a challenge is requested/displayed, an challenge entry (with the challenge solution) is added to the session of the user, for validating after form submission. If you have a lot of users (and spammers), this can lead to a session table growing too big. By default, the CAPTCHA module flushes all solutions when there are 20 unsolved entries in the session.
You can change this threshold in the source code at the top of captcha.module:

<?php
define
('CAPTCHA_UNSOLVED_CHALLENGES_MAX', 20);
?>

There is no option in the CAPTCHA admin gui for this (yet)

Third: it is not recommended to have a setup where there is a CAPTCHA on every page view. From the CAPTCHA help page:

Note that the CAPTCHA module interacts with page caching (see performance settings). Because the challenge should be unique for each generated form, the caching of the page it appears on is prevented. Make sure that these forms do not appear on too many pages or you will lose much caching efficiency. For example, if you put a CAPTCHA on the user login block, which typically appears on each page for anonymous visitors, caching will practically be disabled. The comment submission forms are another example. In this case you should set the "Location of comment submission form" to "Display on separate page" in the comment settings for better caching efficiency.

#3

Christefano - January 26, 2008 - 21:51

This happens to me on groups.drupal.org from time to time.

#4

timurek - January 29, 2008 - 19:12
Category:support request» feature request

Shall we please just remove displaying of this annoying message? It doesn't look out good, user is notified of something he didn't cause in any way.
If CAPTCHA is needed, such as on my website, on almost every page, then OK, we will simply loose caching. On small sites it is not a problem, but displaying annoying message of unknown origin to innocent user we may call a problem :-)

#5

soxofaan - January 29, 2008 - 23:20
Version:5.x-3.1» 5.x-3.x-dev
Component:Miscellaneous» User interface

What precisely do you request?

  • Add an option to not show the message, but still do the flushing?
  • Change the message string? If you know a better phrasing, be welcome. Maybe 'challenge' should be changed to 'CAPTCHA'
  • Add an option to change the flush threshold with a possibility to never flush?
  • something else?

#6

Christefano - January 30, 2008 - 09:35

I like the first option of not showing the message but still flushing the challenges.

#7

soxofaan - January 30, 2008 - 10:39

Another solution would be to flush only the oldest challenges. That would mean a FIFO design instead of the current 'flush everything when full'. Then the message is not needed anymore.

#8

soxofaan - January 30, 2008 - 11:51
Assigned to:Anonymous» soxofaan
Status:active» needs review

this patch implements the idea of #7

AttachmentSize
flushing213928_01.patch 1.31 KB

#9

JohnAlbin - February 4, 2008 - 05:01
Category:feature request» bug report
Status:needs review» reviewed & tested by the community

Works for me.

#10

Christefano - February 4, 2008 - 11:36

Works for me, too. Thanks!

#11

RedBaron - February 7, 2008 - 13:33

I've the same problem with this error. I've downloaded the patch, but I don't know how I can apply this patch?

Do I have just to copy the new code over the old one?

Thanks for your help!

Edit: I've just copied the code over the old one and everything is fine! Thank you guys, the problem is solved! :)

#12

soxofaan - February 15, 2008 - 16:08
Version:5.x-3.x-dev» 6.x-1.x-dev
Status:reviewed & tested by the community» patch (to be ported)

fixed for 5.x-3.x by http://drupal.org/cvs?commit=101161

#13

soxofaan - February 15, 2008 - 16:34
Status:patch (to be ported)» fixed

fixed for 6.x.1.x by http://drupal.org/cvs?commit=101170

#14

Anonymous (not verified) - February 29, 2008 - 16:42
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.