View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
19959Bug reportsSurvey participants (Tokens)public2025-03-04 12:17
ReporterTonisOrmisson Assigned ToDenisChenu  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version6.6.x 
Summary19959: token->token will not allow standard uuid format tokens (removes dashes)
Description

UUID standard format contains dashes, example: f3f2e850-b5d4-11ef-ac7e-96584d5248b2

Token model validation strips the dashes from the original input and saves the model with the altered (dashes removed).

UUID with dashes is the standard representation, see:
https://www.rfc-editor.org/rfc/rfc4122#page-4

token->token not accepting stantard uuid format is a a bug

Steps To Reproduce

Steps to reproduce

take any survey with tokens, add a token with token->token value as uuid, eg "f3f2e850-b5d4-11ef-ac7e-96584d5248b2"

Expected result

token is saved, and token->token value is unchanged "f3f2e850-b5d4-11ef-ac7e-96584d5248b2"

Actual result

token is changed with dashes removed "f3f2e850b5d411efac7e-96584d5248b2"

(will do a pr)

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)6.10.3+250203
I will donate to the project if issue is resolvedNo
Browser
Database type & versionn/a
Server OS (if known)
Webserver software & version (if known)
PHP Versionn/a

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2025-02-25 16:56

developer   ~82142

https://github.com/LimeSurvey/LimeSurvey/pull/4168

DenisChenu

DenisChenu

2025-02-25 16:58

developer   ~82143

I update the manual when it's done.

tibor.pacalat

tibor.pacalat

2025-02-25 17:04

administrator   ~82144

Merged @DenisChenu , you can update the manual.

LimeBot

LimeBot

2025-03-03 18:13

administrator   ~82188

Fixed in Release 6.11.0+250303

DenisChenu

DenisChenu

2025-03-04 10:32

developer   ~82191

https://www.limesurvey.org/manual/index.php?title=Optional_settings&diff=379767&oldid=379633

tibor.pacalat

tibor.pacalat

2025-03-04 10:39

administrator   ~82192

@DenisChenu "...These settings allow to set the regexp pattern when filtering token."
Why "filtering", shouldn't it say "generating"?

DenisChenu

DenisChenu

2025-03-04 11:29

developer   ~82194

No : it's a filter : generation was done elsewhere.
Here : its' when you update manually, or import etc.

generate : https://github.com/LimeSurvey/LimeSurvey/blob/4af30ea4398b49a2ada587312173d667fd190143/application/models/Token.php#L295
Sanitize/filter : https://github.com/LimeSurvey/LimeSurvey/blob/4af30ea4398b49a2ada587312173d667fd190143/application/models/Token.php#L417

Maybe These settings allow to set the regexp pattern when sanitize token. ?

tibor.pacalat

tibor.pacalat

2025-03-04 12:17

administrator   ~82195

Ah gotcha, thanks for clarifying!

Issue History

Date Modified Username Field Change
2025-02-12 11:45 TonisOrmisson New Issue
2025-02-12 11:45 TonisOrmisson Assigned To => TonisOrmisson
2025-02-12 11:45 TonisOrmisson Status new => assigned
2025-02-14 07:38 TonisOrmisson Status assigned => ready for testing
2025-02-25 16:56 DenisChenu Assigned To TonisOrmisson => tibor.pacalat
2025-02-25 16:56 DenisChenu Note Added: 82142
2025-02-25 16:56 DenisChenu Bug heat 0 => 2
2025-02-25 16:58 DenisChenu Note Added: 82143
2025-02-25 17:04 tibor.pacalat Note Added: 82144
2025-02-25 17:04 tibor.pacalat Bug heat 2 => 4
2025-02-25 17:04 tibor.pacalat Status ready for testing => resolved
2025-02-25 17:04 tibor.pacalat Resolution open => fixed
2025-02-25 17:04 DenisChenu Assigned To tibor.pacalat => DenisChenu
2025-03-03 18:13 LimeBot Note Added: 82188
2025-03-03 18:13 LimeBot Status resolved => closed
2025-03-03 18:13 LimeBot Bug heat 4 => 6
2025-03-04 10:32 DenisChenu Note Added: 82191
2025-03-04 10:39 tibor.pacalat Note Added: 82192
2025-03-04 11:29 DenisChenu Note Added: 82194
2025-03-04 12:17 tibor.pacalat Note Added: 82195