View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
16484Bug reportsSurvey participants (Tokens)public2022-04-22 18:01
Reporteradeuschlinger Assigned Togabrieljenik  
PrioritylowSeveritypartial_block 
Status closedResolutionfixed 
Product Version3.22.19 
Summary16484: Default token length is 36 and leads to an error on the SQL server
Description

My Setup:

  • LimeSurvey Version 3.17.9+190731
  • Windows Server 2016 + IIS 10.0
  • MS SQL Server 2017

In my surveys the default token length was always set to 36.
When I generate the tokens an SQ error occurs, because the max length of the token-length-column is 35 (not 36).

500: Internal Server Error
CDbCommand konnte das SQL-Statement nicht ausführen: SQLSTATE[22001]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]String or binary data would be truncated.
An internal error occurred while the Web server was processing your request.

Workaround: Change the token length in each survey manually.

Then I found the following code in surveyadmin.php starting from line 2099:
if ($iTokenLength > 36) {
$iTokenLength = 36;
}

My issue did not appear anymore after I changed the above code to:
if ($iTokenLength >= 36) {
$iTokenLength = 35;
}

KR,
Alex

Steps To Reproduce
  1. Create a survey
  2. Create a participants table
  3. create participants
  4. Generate Tokens
Additional Information

I can see the same code in LimeSurvey 3.22.25+200706

TagsNo tags attached.
Attached Files
2020-07-10 15_16_11-Window.png (46,222 bytes)   
2020-07-10 15_16_11-Window.png (46,222 bytes)   
Bug heat6
Complete LimeSurvey version number (& build)3.17.9+190731
I will donate to the project if issue is resolvedNo
BrowserGoogle Chrome
Database type & versionMS SQL Server 2017
Server OS (if known)Windows Server 2016
Webserver software & version (if known)IIS 10.0
PHP Version 7.2.19

Users monitoring this issue

There are no users monitoring this issue.

Activities

ollehar

ollehar

2020-07-14 11:19

administrator   ~58939

Please update to the latest version and try again. Thank you.

ollehar

ollehar

2020-07-14 11:19

administrator   ~58940

Oh, you checked the code in latest version already?

adeuschlinger

adeuschlinger

2020-07-14 17:09

reporter   ~58945

I just checked the code in the latest version.
i did not run the update to the latest version.

gabrieljenik

gabrieljenik

2022-04-22 15:10

manager   ~69196

Hello,
This ticket has been open for quite some time.
Do you have any new info / feedback?
Can you please check if this issue still exists in the latest version of LimeSurvey and let us know?
Thank you!

gabrieljenik

gabrieljenik

2022-04-22 18:01

manager   ~69201

Hello adeuschlinger,
This should already be fixed in recent versions.
https://github.com/LimeSurvey/LimeSurvey/blob/master/application/controllers/admin/Database.php#L761

Can you please check if this issue still exists in the latest version of LimeSurvey and let us know?
Thank you!

Issue History

Date Modified Username Field Change
2020-07-10 15:18 adeuschlinger New Issue
2020-07-10 15:18 adeuschlinger File Added: 2020-07-10 15_16_11-Window.png
2020-07-14 11:19 ollehar Product Version => 3.22.19
2020-07-14 11:19 ollehar Description Updated
2020-07-14 11:19 ollehar Steps to Reproduce Updated
2020-07-14 11:19 ollehar Note Added: 58939
2020-07-14 11:19 ollehar Note Added: 58940
2020-07-14 17:09 adeuschlinger Note Added: 58945
2020-12-29 16:57 cdorin Priority none => low
2020-12-29 16:57 cdorin Status new => acknowledged
2022-04-22 15:10 gabrieljenik Assigned To => gabrieljenik
2022-04-22 15:10 gabrieljenik Status acknowledged => feedback
2022-04-22 15:10 gabrieljenik Note Added: 69196
2022-04-22 15:10 gabrieljenik Bug heat 4 => 6
2022-04-22 18:01 gabrieljenik Status feedback => closed
2022-04-22 18:01 gabrieljenik Resolution open => fixed
2022-04-22 18:01 gabrieljenik Note Added: 69201