View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
16717Bug reportsSurvey participants (Tokens)public2021-03-11 17:40
ReporterSelcal Assigned Toollehar  
PrioritynoneSeveritypartial_block 
Status assignedResolutionopen 
Product Version3.22.25 
Summary16717: Survey opened twice at same time causes double database entry and makes results blank
Description

When a survey is opened twice at virtually the same time, a double database entry is created in the survey_xxxxxx database. They each have the same token, but a different seed. The first one will have all null answers/datetime/etc, the other contains the correct actual submitted information.
Then, when retrieving the response for the token, the result will show blank as the first matching token row in the database is null, and this is read and shown. Though the second matching row contains the submitted data, it is not read and displayed in the result view for the token.

Occurred since I've been using LimeSurvey 3.x in many previous versions before, and at this moment also occurs on my 4.x (now running 4.3.18).
Most recently, running PHP 7.4.9, MariaDB, 10.3.23-MariaDB-log-cll-lve - MariaDB Server, Protocol v10. Issue also arose in PHP7.1.x.
Linux (3.10.0-962.3.2.lve1.5.32.el6h.x86_64), with Apache. All recommended PHP modules installed.
Not running any plugins, using default settings from LS installer.

Steps To Reproduce
  • Generate survey
  • Generate invite/token, create direct token survey login link
  • Put link in an email/webpage that will open it when clicked once
  • Activate/click the link twice (accidental double-click) to open two tabs with the survey

Alternatively:

  • Prepare two browser windows (if using different browsers the issue is even easier to reproduce) with the link ready in URL field
  • Now quickly swap between the two and press enter on the url to open the two links at same time

The above is easier to reproduce if the survey is not cached yet; loading takes longer and the timeframe for this issue to occur is bigger.

Additional Information

Background:

I mostly provide invite/survey for third parties making it hard to get in touch with end users. Sometimes results would not show up and I found the double entries. I wrote a cron to detect them and remove the orphaned entries. This allowed me to keep track of occurrences which were relatively regular (1% or so).

Turns out some end-users have Outlook in their company network, but sometimes also use Outlook web.
On Outlook, a link is opened by double-clicking (security setting). In web outlook, it is a single click.

The users on occasion, and out of habit, double-clicked in web outlook, opening the survey twice at virtually the same time. It then occurred to me that this may trigger the issue. And then I could reproduce it.

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)3.22.25 and 4.3.18
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMariaDB, 10.3.23
Server OS (if known)Linux
Webserver software & version (if known)Apache
PHP Version7.4.9

Users monitoring this issue

Selcal

Activities

ollehar

ollehar

2021-03-10 17:14

administrator   ~63065

You're using an outdated version of LimeSurvey. Please update to the latest version and check if the bug can still be reproduced. Thank you.

Selcal

Selcal

2021-03-11 17:40

reporter   ~63313

I can still reproduce this with 4.4.12 210308.
Have tried with two different hosting providers. It can also affect CSRF tokens, generating an error for the 'first come' pageload when survey is filled.

Issue History

Date Modified Username Field Change
2020-10-02 16:16 Selcal New Issue
2020-10-02 16:17 Selcal Issue Monitored: Selcal
2021-03-10 17:14 ollehar Assigned To => ollehar
2021-03-10 17:14 ollehar Status new => feedback
2021-03-10 17:14 ollehar Note Added: 63065
2021-03-11 17:40 Selcal Note Added: 63313
2021-03-11 17:40 Selcal Status feedback => assigned