View Issue Details

IDProjectCategoryView StatusLast Update
0013141mantisbtbugtrackerpublic2014-09-23 18:05
Reportertoddpw Assigned Todhx  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.2.5 
Fixed in Version1.2.8 
Summary0013141: wrong args passed to config_get in filter_db_get_filter
Description

In core/filter_api.php:filter_db_get_filter(), there is a call to config_get which appears to have a missing 'p_default' arg passed in between the required args and the project_id+user_id:

check that the user has access to non current filters

if(( ALL_PROJECTS <= $row['project_id'] ) && ( !is_blank( $row['name'] ) ) && ( !access_has_project_level( config_get( 'stored_query_use_threshold', $row['project_id'], $t_user_id ) ) ) ) {
return null;
}

I think the args to config_get here should be:

config_get( 'stored_query_use_threshold', null, $row['project_id'], $t_user_id )

Tagspatch

Relationships

related to 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 

Activities

atrol

atrol

2011-07-16 15:32

developer   ~0029180

function config_get( $p_option, $p_default = null, $p_user = null, $p_project = null )
There is another bug, so this should be
config_get( 'stored_query_use_threshold', null, $t_user_id, $row['project_id'] )

dhx

dhx

2011-09-05 07:49

reporter   ~0029639

Thanks Todd & Roland for the careful eye. I have committed a patch (see attached changeset for details) to resolve this issue.

grangeway

grangeway

2013-04-05 17:57

reporter   ~0036401

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

Related Changesets

MantisBT: master 7af2f47a

2011-09-05 00:41

dhx


Details Diff
Fix 0013141: Incorrect parameters to config_get function

Thanks to Todd Whitesel for finding this problem in filter_api.php and
to Roland Becker for providing further assistance.

I have grepped the source code and reviewed all other calls to
config_get to ensure they correctly use parameters. There was one
additional bug discovered in bug_report_page.php.

Conflicts:
bug_report_page.php
Affected Issues
0013141
mod - bug_report_page.php Diff File
mod - core/filter_api.php Diff File

MantisBT: master-1.2.x 955d1cb5

2011-09-05 00:41

dhx


Details Diff
Fix 0013141: Incorrect parameters to config_get function

Thanks to Todd Whitesel for finding this problem in filter_api.php and
to Roland Becker for providing further assistance.

I have grepped the source code and reviewed all other calls to
config_get to ensure they correctly use parameters. There was one
additional bug discovered in bug_report_page.php.
Affected Issues
0013141
mod - bug_report_page.php Diff File
mod - core/filter_api.php Diff File