View Issue Details

This issue affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
16188Bug reportsUser / Groups / Rolespublic2020-10-26 15:24
ReporterJmantysalo Assigned ToDenisChenu  
PrioritynoneSeveritytrivial 
Status closedResolutionno change required 
Product Version4.2.0 
Summary16188: Off-by-one limit of user group name length
Description

application/controllers/admin/usergroups.php:

if (strlen($db_group_name) > 21) {
. . .
Yii::app()->user->setFlash('error', gT("Failed to add group! Group name length more than 20 characters."));

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)Version 4.2.0
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

Jmantysalo

Jmantysalo

2020-04-26 19:39

reporter   ~57372

I made a pull request for this one.

DenisChenu

DenisChenu

2020-04-27 09:12

developer   ~57373

https://github.com/LimeSurvey/LimeSurvey/blob/0e33f5584c2ed4d22146be0f380c61ffde1e08a3/application/models/UserGroup.php#L59

:)

DenisChenu

DenisChenu

2020-05-04 12:53

developer   ~57522

This line don't seem to be used,

Do you have a way to reproduce ?

controller are replaced by https://github.com/LimeSurvey/LimeSurvey/commit/df59832ff0af208397568038261b7171be38a796#diff-8db47338464471400005e3f52e24bca5

@p_stelling : can you confirm all application/controllers/admin/usergroups.php are deprecated ?

Jmantysalo

Jmantysalo

2020-05-04 14:52

reporter   ~57523

I did not reproduce, as there was limit in the HTML source. I just noticed this when doing something else, 16185 I guess.

DenisChenu

DenisChenu

2020-05-06 15:06

developer   ~57585

For the limit in HTML : you can use F12/inpector to update it.

File are not used.

Mazi

Mazi

2020-10-26 15:24

updater   ~60413

Maybe the group title contained special characters? Because the strlen() function actually checks for byte length and not for character length. A special character uses more bytes, that could cause the issue.

Issue History

Date Modified Username Field Change
2020-04-26 15:48 Jmantysalo New Issue
2020-04-26 19:39 Jmantysalo Note Added: 57372
2020-04-27 09:12 DenisChenu Note Added: 57373
2020-05-04 12:43 DenisChenu Assigned To => DenisChenu
2020-05-04 12:43 DenisChenu Status new => assigned
2020-05-04 12:53 DenisChenu Note Added: 57522
2020-05-04 14:52 Jmantysalo Note Added: 57523
2020-05-06 15:06 DenisChenu Status assigned => closed
2020-05-06 15:06 DenisChenu Resolution open => no change required
2020-05-06 15:06 DenisChenu Note Added: 57585
2020-10-26 15:24 Mazi Note Added: 60413