View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
09473Feature requestsSurvey participants (Tokens)public2020-03-09 19:18
Reportergab79 Assigned To 
PrioritynormalSeverityfeature 
Status newResolutionopen 
Summary09473: Configurable token length min, max and default
Description

The token lenght is checked with hardcoded values, the patch will let a system customize min max and default overriding in config.php the values

$config['token_length_min'] = 5;
$config['token_length_max'] = 36;
$config['token_length_default'] = 15;

which are now used admin/database, admin/surveyadmin, admin/token and models/TokenDynamic

Additional Information

Patched code https://github.com/gmambro/LimeSurvey/tree/tokenlen

TagsNo tags attached.
Bug heat8
Story point estimate
Users affected %

Users monitoring this issue

isaacmarco

Activities

DenisChenu

DenisChenu

2015-02-04 09:40

developer   ~31624

Last edited: 2015-02-04 09:43

token_length_max : DB issue , then we don't need
<s>token_length_default : already in token_length</s>
token_length_min : ??? With very little character it broke autogeneration. But you can already use a token of 1 character when import.

Oups : token_length_default are OK.

gab79

gab79

2015-02-04 10:10

reporter   ~31626

Without the patch when a survey owner edits the survey token length, using "Edit survey settings" > "Tokens" > "Set token length to:", this value is checked in application/controllers/admin/surveyadmin.php in order to be in the range 5-36, with 15 as a default. I'd like to give to a system administrator a way to tweak this range, e.g. forcing all the users to have a minimun of 10 instead of 5.

gab79

gab79

2015-02-05 15:07

reporter   ~31638

@Denis patch has been updated according to your note in github

DenisChenu

DenisChenu

2015-02-05 16:20

developer   ~31640

Hi,

I think we must move whole to model for better evolution. After a model _construct function can extend some default value. Why not :)

isaacmarco

isaacmarco

2020-03-09 19:18

reporter   ~56387

Not sure how to vote for this feature. The "Issue Community Support" section was not found.

I would love to be able to have 40 characters for the token in order to be able to save SHA1 generated tokens because 36 characters are insufficient for this.

This feature would be perfect for me.

Issue History

Date Modified Username Field Change
2015-01-23 18:00 gab79 New Issue
2015-02-04 09:40 DenisChenu Note Added: 31624
2015-02-04 09:41 DenisChenu Project @2@ => Feature requests
2015-02-04 09:41 DenisChenu Category Tokens => Other issues
2015-02-04 09:41 DenisChenu Severity @50@ => feature
2015-02-04 09:41 DenisChenu Category Other issues => Accessibility
2015-02-04 09:43 DenisChenu Note Edited: 31624
2015-02-04 10:10 gab79 Note Added: 31626
2015-02-05 15:07 gab79 Note Added: 31638
2015-02-05 16:20 DenisChenu Note Added: 31640
2015-11-02 17:49 DenisChenu Category Accessibility => Tokens
2016-12-08 10:39 c_schmitz Category Tokens => Survey participants (Tokens)
2020-03-09 19:02 isaacmarco Issue Monitored: isaacmarco
2020-03-09 19:18 isaacmarco Note Added: 56387