View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
10985Bug reportsTheme editorpublic2016-04-21 11:40
Reporterdujiulun2006 Assigned Toc_schmitz  
PrioritynoneSeveritypartial_block 
Status closedResolutionfixed 
Product Version2.50.x 
Fixed in Version2.50.x 
Summary10985: Theme editor URL contain %uNNNN and server gives "400 Bad Request"
Description

When a theme is duplicated in Chinese install, the new theme is automatically named "副本xxx". Then if I want to edit it (Settings - Template Editor), and I switch to it in the template list dropdown, the name is escaped (instead of URL-encoded) and produces URL with "%uNNNN" unicode characters. These URLs cause Apache and most other servers to give "400 Bad Request".

The dropdown can be found at:
index.php/admin/templates/sa/view (The first dropdown from left)
The problematic URL is similar to:
index.php/admin/templates/sa/view/editfile/startpage.pstpl/screenname/welcome/templatename/%u526F%u672Cdefault
The escape() can be found at:
/application/views/admin/templates/templateeditorbar_view.php
/application/views/admin/templates/templatesummary_view.php

Steps To Reproduce
  1. Duplicate a template and make sure the name contains Chinese characters.
  2. Go to Template Editor and switch to it in the dropdown.
  3. The server gives 400 Bad Request.
TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)160418
I will donate to the project if issue is resolvedNo
BrowserChrome 49
Database type & versionMySQL 5.5.47
Server OS (if known)Ubuntu 14.04
Webserver software & version (if known)Apache 2.4.7
PHP Version5.5.9

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2016-04-20 10:00

administrator   ~37572

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

dujiulun2006

dujiulun2006

2016-04-20 12:29

reporter   ~37592

escape() is also used in the exact same way in /application/views/admin/templates/templatesummary_view.php, but it's not fixed.

Also, I believe encodeURIComponent() should be used instead of encodeURI(). The former is, as the name suggests, for encoding an component of URI, and it encodes more characters than encodeURI().

c_schmitz

c_schmitz

2016-04-20 14:27

administrator   ~37608

It is not fixed because it is not necessary to uriencode these at all. The screen names are fixed values.

c_schmitz

c_schmitz

2016-04-21 11:40

administrator   ~37629

Version 2.50+ Build 160421 released

Related Changesets

LimeSurvey: master 02d549c3

2016-04-20 08:00:41

c_schmitz

Details Diff
Fixed issue 10985: Theme editor unable to handle theme names with special characters Affected Issues
10985
mod - application/controllers/admin/templates.php Diff File
mod - application/views/admin/survey/surveySummary_view.php Diff File
mod - application/views/admin/templates/templateeditorbar_view.php Diff File

Issue History

Date Modified Username Field Change
2016-04-19 18:45 dujiulun2006 New Issue
2016-04-20 09:59 c_schmitz Assigned To => c_schmitz
2016-04-20 09:59 c_schmitz Status new => assigned
2016-04-20 10:00 c_schmitz Status assigned => resolved
2016-04-20 10:00 c_schmitz Fixed in Version => 2.5
2016-04-20 10:00 c_schmitz Resolution open => fixed
2016-04-20 10:00 c_schmitz Changeset attached => LimeSurvey master 02d549c3
2016-04-20 10:00 c_schmitz Note Added: 37572
2016-04-20 12:29 dujiulun2006 Note Added: 37592
2016-04-20 12:29 dujiulun2006 Status resolved => feedback
2016-04-20 12:29 dujiulun2006 Resolution fixed => reopened
2016-04-20 14:27 c_schmitz Note Added: 37608
2016-04-20 14:27 c_schmitz Status feedback => resolved
2016-04-20 14:27 c_schmitz Resolution reopened => fixed
2016-04-21 11:40 c_schmitz Note Added: 37629
2016-04-21 11:40 c_schmitz Status resolved => closed