View Issue Details

IDProjectCategoryView StatusLast Update
0021136mantisbtadministrationpublic2016-07-09 19:28
ReporterdregadAssigned Todregad 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.2.13 
Target Version1.3.0Fixed in Version1.3.0 
Summary0021136: Editing config option containing newline corrupts them by inserting
tags
Description

If an existing config option containing newline characters (e.g. 'ABC\nDEF') is edited, it is displayed in the textarea as

ABC< br />
DEF

And when saved, the br tags are stored as-is in the config table.

TagsNo tags attached.

Activities

dregad

dregad

2016-06-18 04:38

developer   ~0053406

PR for review & test: https://github.com/mantisbt/mantisbt/pull/796

Related Changesets

MantisBT: master-1.3.x 7bbf2ea4

2016-06-16 20:11:55

dregad

Details Diff
Avoid config values corruption when editing them

Prior to this, an nl2br() conversion was systematically performed when
displaying the config option. This caused insertion of '<br />' tags
when editing configs containing newlines, which would then be saved.

We now only perform the nl2br conversion when the config is printed for
display.

Fixes 0021136
mod - adm_config_report.php Diff File

MantisBT: master-1.3.x 9ed0b9f5

2016-07-03 05:50:40

dregad

Details Diff
Fix config parsing issues and improve unit tests

PR https://github.com/mantisbt/mantisbt/pull/796

Fixes 0021124, 0021136
mod - adm_config_report.php Diff File
mod - adm_config_set.php Diff File
mod - core/classes/ConfigParser.class.php Diff File
mod - core/classes/Tokenizer.class.php Diff File
mod - tests/Mantis/ConfigParserTest.php Diff File

Issue History

Date Modified Username Field Change
2016-06-17 11:55 dregad New Issue
2016-06-17 11:55 dregad Status new => assigned
2016-06-17 11:55 dregad Assigned To => dregad
2016-06-18 04:38 dregad Note Added: 0053406
2016-07-03 05:52 dregad Changeset attached => MantisBT master-1.3.x 7bbf2ea4
2016-07-03 05:52 dregad Changeset attached => MantisBT master-1.3.x 9ed0b9f5
2016-07-03 05:52 dregad Status assigned => resolved
2016-07-03 05:52 dregad Resolution open => fixed
2016-07-03 05:52 dregad Fixed in Version => 1.3.0
2016-07-09 19:28 vboctor Status resolved => closed