View Issue Details

IDProjectCategoryView StatusLast Update
0009426mantisbtadministrationpublic2008-07-31 17:39
Reporterdogletree Assigned Togiallu  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Product Version1.1.2 
Target Version1.1.3Fixed in Version1.1.3 
Summary0009426: Creating the view_issues_page_columns creates a string
Description

I've followed the instructions referenced here
http://www.mantisbt.org/wiki/doku.php/mantisbt:customizing_columns_in_view_issues_page#introduction

I've done this about a dozen time and every time I perform the operation a string is created in the type feild.

Steps To Reproduce
*
  Click “Manage” from Main Menu.
*
  Click “Manage Configuration” from “Manage” sub-menu.
*
  “Configuration Report” will be selected by default.
*
  Scroll to the form at the bottom of the page.
*
  Select the user to which the change applies or “All Users”.
*
  Select the project to which the change applies or “All Projects”.
*
  Type “view_issues_page_columns” in the “configuration option” field.
*
  Leave “Type” field set to “Default”.
*
  Set the “Value” field to an array of the column names to be shown.

array ( 'selection', 'edit', 'priority', 'id', 'sponsorship_total', 'bugnotes_count', 'attachment', 'category', 'severity', 'status', 'last_updated', 'summary' );

TagsNo tags attached.

Relationships

related to 0008976 closedgiallu Remote Code Execution in adm_config 
has duplicate 0009455 closedjreese Database configuration does not correctly deal with array 

Activities

dogletree

dogletree

2008-07-21 12:02

reporter   ~0018628

OK this issue is resolved. I got this to work by not adding a semi colon and not adding quotes to the strings. Seems to me the wiki should note this...

giallu

giallu

2008-07-21 18:12

reporter   ~0018631

This is a side effect of thefix I made for the security issue detailed in 0008976.

I took care of updating the wiki, thanks for noticing

bbenedek

bbenedek

2008-07-25 04:10

reporter   ~0018671

Hi,

I've also tried to use this feature, but took me a little while to figure out, what's happening when I tried to act as it is described in the wiki tutorial.

Apparently the regexp code in adm_config_set, line 84, is looking for an expression like

array(

without any (white)space between the 'array' keyword and the opening parenthesis.

So if you add a new entry, use

array( selection, edit, priority, id, sponsorship_total, bugnotes_count, attachment, category, severity, status, last_updated, summary )

Or, as a smarter alternative, I'd like to suggest the following change to the code, line 84:

old:

if ( preg_match('/array((.*))/', $t_full_string, $t_match) === 1 ) {

new:

if ( preg_match('/array[\s]((.))/', $t_full_string, $t_match) === 1 ) {

giallu

giallu

2008-07-25 12:38

reporter   ~0018674

Right. I committed the change in

http://mantisbt.svn.sourceforge.net/mantisbt/?rev=5420&view=rev
and
http://mantisbt.svn.sourceforge.net/mantisbt/?rev=5421&view=rev

thanks for noticing

Related Changesets

MantisBT: master-1.1.x 53b3331b

2008-07-25 12:35

giallu


Details Diff
Loosen regexp matching as suggested in bug 0009426

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/branches/BRANCH_1_1_0@5420 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9
Affected Issues
0009426
mod - adm_config_set.php Diff File

MantisBT: master c6393d1d

2008-07-25 12:37

giallu


Details Diff
Loosen regexp matching as suggested in bug 0009426

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@5421 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9
Affected Issues
0009426, 0009455
mod - adm_config_set.php Diff File