View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
20034Bug reportsAuthenticationpublic2025-03-26 10:50
Reporterriqcles Assigned To 
PrioritynoneSeverityblock 
Status newResolutionopen 
Product Version6.6.x 
Summary20034: Exceeding the number of maximum access code validation attempts - V6.10.6
Description

Tested on demo.limesurvey.org

relationship : https://bugs.limesurvey.org/view.php?id=17695

Same problem, but you have to activate captcha for reproduce the error.
and you can notice that the captcha disapear.

The procedure is the same as bug 17695.

You can create a simple survey, add dummy participants, and run the test, without even activating the survey.

I tested as an admin, not as a user without privileges, but it should be the same (I've been reported the access issue on surveys in progress).

for one survey, if a participant provided a wrong token five times, a message showing "You have exceeded the number of maximum access code validation attempts. Please wait 10 minutes before trying again" appears and accordingly all participants for all active surveys became unable to access the surveys until the 10 minutes waiting time finish. not only the survey participants, but also admin users can't sign in until waiting time get finish.

Similarly, if an admin user provided 3 wrong password attempts, all other users should wait 10 minutes to access. the rule should be applied to that particular user only not to all users. also, when this issue happened, survey participants will see a message saying please wait 10 minutes before trying again. however, if they provide a right token number, they will be able to access.

Steps To Reproduce

Steps to reproduce
Create a survey
Add dummy participant
Make the captcha mandatory
Go to the menu: Overview
Open the link in a new tab: Share the questionnaire
Provide wrong token number five times.

Expected result
Access should be denied on that survey only and for that participant only (through ip address for example)

Actual result
the captcha disappears
LS Access denied for all participants of all surveys as well as for admin users until after 10 minutes.

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)LimeSurvey Community Edition Version 6.10.6
I will donate to the project if issue is resolvedNo
BrowserFirefox / Chrome
Database type & versionPostgresql 17
Server OS (if known)Wamp / RockyLinux
Webserver software & version (if known)Apache 2.4.
PHP VersionPHP Version 8.2.4

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2025-03-25 11:10

developer   ~82316

  1. IP allowlist is here for this
  2. My opinon : best configuration for token are Maximum number of attempts: 1 and Lockout time in seconds (after maximum number of attempts): 1. Human didn't care (or see) the time out. But robot can not really use it.

Can close ?

DenisChenu

DenisChenu

2025-03-25 11:10

developer   ~82317

for that participant only (through ip address for example)

It must be the case : same company ?

riqcles

riqcles

2025-03-25 12:10

reporter   ~82319

In fact, the people responding are external to the company. They are internet users, so each questionnaire is blocked, with the option to unblock the questionnaire in question after verifying the IP address that caused the block.

What's unfortunate is that the entire site is blocked for all questionnaires, even though one or two people made a mistake when entering the token.

DenisChenu

DenisChenu

2025-03-25 14:17

developer   ~82320

It's blocked for THIS ip ? right ?

Maybe there are a proxy issue about IP ?

riqcles

riqcles

2025-03-26 10:37

reporter   ~82327

Hello,
Thanks to Denis for the information.
Indeed, the IP address that is blocked is that of the Internet server (due to a very specific network configuration).
The solution for blocking surveys on a single attempt, with a timeout of 10 seconds, seems very good to me, and I'm going to use it.

But the timeout message appears, indicating that you have to wait 0 minutes (whether you choose 1 second or 50, it's the same: the user won't know that they have to wait the specified number of seconds).

We still have the captcha that disappears after several unsuccessful errors: wait for the session to end or clear your browser cache.

We can close the bug, as it's a security measure (but it's surprising when all your surveys are inaccessible due to incorrect user input (who told them to use the link without the token... anyway).

DenisChenu

DenisChenu

2025-03-26 10:44

developer   ~82328

Indeed, the IP address that is blocked is that of the Internet server (due to a very specific network configuration).

Do you have a way to get the original IP ?
See our system : https://github.com/LimeSurvey/LimeSurvey/blob/1d7e1ca80d8272b79976af431462ef0c1d6ba8ae/application/helpers/common_helper.php#L4613

The solution for blocking surveys on a single attempt, with a timeout of 10 seconds, seems very good to me, and I'm going to use it.

You must not use such solution if you have same IP for all users ...

DenisChenu

DenisChenu

2025-03-26 10:48

developer   ~82329

Last edited: 2025-03-26 10:50

See https://stackoverflow.com/a/916157/2239406

And about HTTP_CLIENT_IP : seesm unclear : if we get some 192.168.0.X : we must add it to $_SERVER['REMOTE_ADDR']. But need such Internet sharing to test :)

https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Forwarded-For

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Forwarded-For#selecting_an_ip_address too

Issue History

Date Modified Username Field Change
2025-03-25 10:47 riqcles New Issue
2025-03-25 11:10 DenisChenu Note Added: 82316
2025-03-25 11:10 DenisChenu Bug heat 0 => 2
2025-03-25 11:10 guest Bug heat 2 => 0
2025-03-25 11:10 DenisChenu Bug heat 0 => 2
2025-03-25 11:10 DenisChenu Note Added: 82317
2025-03-25 12:10 riqcles Note Added: 82319
2025-03-25 12:10 riqcles Bug heat 2 => 4
2025-03-25 14:17 DenisChenu Note Added: 82320
2025-03-26 10:37 riqcles Note Added: 82327
2025-03-26 10:44 DenisChenu Note Added: 82328
2025-03-26 10:48 DenisChenu Note Added: 82329
2025-03-26 10:49 DenisChenu Note Edited: 82329
2025-03-26 10:50 DenisChenu Note Edited: 82329