View Issue Details

This issue affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
19503Bug reportsTheme editorpublic2026-10-26 14:45
ReporterDenisChenu Assigned Toc_schmitz  
PrioritynoneSeverityminor 
Status resolvedResolutionfixed 
Product Version5.6.x 
Summary19503: Theme start by space can be created but not deleted, delete
Description

When create a theme start by space it accepted, but when you try to delete : you can not because of security reason

Steps To Reproduce

Steps to reproduce

Create a theme " themewithspace"
Uninstall theme
Try to delete theme

Other way:
Create "extend_vanilla"
Extend to " extend_vanilla"
Delete

Expected result

Theme was deleted (maybe with a warning)

Actual result

Receive a 403 error.

Steps to reproduce

Other way:
Create "extend_vanilla"
Extend to " extend_vanilla"
Delete " extend_vanilla" theme

Expected result

" extend_vanilla" theme was deleted

Actual result

"extend_vanilla" theme was deleted

Additional Information

I think it can be worst ! You can delete another directory !
Confirm

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)5.6.57
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionmssql
Server OS (if known)windows
Webserver software & version (if known)IIS
PHP Version8.0
Git branch / Pull Request URLN/A

Relationships

related to 19502 closedc_schmitz Invalid theme goes to max_execution_time 
related to 19507 closedc_schmitz Invalid theme can cause CException and no easy way to fix it 

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2024-03-29 15:49

developer   ~79848

With windows : PHP create the directory but you can not add a space via file browser …
And seems space was dleted when copying directory …
It can be a good idea to disallow space at start or end.

DenisChenu

DenisChenu

2024-03-29 15:49

developer   ~79849

Oh !
I think it can be worst ! You can delete another directory !

c_schmitz

c_schmitz

2026-10-26 14:31

administrator   ~86854

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=41036

Related Changesets

LimeSurvey: master 97e76581

2026-10-26 14:31

c_schmitz


Details Diff
Fixed issue 19503: Deleting a survey theme whose name starts with a space deleted another theme or failed
Dev Theme deletion now uses the exact posted name; deleteAvailableTheme only accepts a directory directly inside the user theme root, an empty name or "." deleted the whole user theme root
Dev Uploaded survey theme folder names are trimmed like copied/renamed ones
Affected Issues
19503
mod - application/controllers/admin/Themes.php Diff File
add - tests/unit/controllers/ThemeDeleteNameTest.php Diff File

Issue History

Date Modified Username Field Change
2024-03-29 15:47 DenisChenu New Issue
2024-03-29 15:49 DenisChenu Note Added: 79848
2024-03-29 15:49 DenisChenu File Added: Capture d’écran du 2024-03-29 14-48-27.png
2024-03-29 15:49 DenisChenu Bug heat 0 => 2
2024-03-29 15:49 DenisChenu Note Added: 79849
2024-04-01 11:00 DenisChenu Summary Theme start by space can be created but not deleted => Theme start by space can be created but not deleted, delete
2024-04-01 11:00 DenisChenu Steps to Reproduce Updated
2024-04-01 11:00 DenisChenu Additional Information Updated
2024-04-01 11:00 DenisChenu Relationship added related to 19502
2026-10-26 14:31 c_schmitz Changeset attached => LimeSurvey master 97e76581
2026-10-26 14:31 c_schmitz Note Added: 86854
2026-10-26 14:31 c_schmitz Assigned To => c_schmitz
2026-10-26 14:31 c_schmitz Status new => resolved
2026-10-26 14:31 c_schmitz Resolution open => fixed
2026-10-26 14:31 c_schmitz Bug heat 2 => 4
2026-10-26 14:45 c_schmitz Relationship added related to 19507