Skip to content

Commit

Permalink
Fix #12230: XSS vulnerability when deleting maliciously named categories
Browse files Browse the repository at this point in the history
As reported by Secunia, SA40832, there is an XSS vulnerability when
deleting project categories that have been maliciously named. The chance
of attack is low due to requiring project manager access to create
malicious project categories in the first place.

Thanks to John Reese for debugging this issue.
  • Loading branch information
davidhicks committed Aug 4, 2010
1 parent 49070ba commit a374a7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions manage_proj_cat_delete.php
Expand Up @@ -31,7 +31,7 @@

auth_reauthenticate();

$f_category_id = gpc_get_string( 'id' );
$f_category_id = gpc_get_int( 'id' );
$f_project_id = gpc_get_int( 'project_id' );

access_ensure_project_level( config_get( 'manage_project_threshold' ), $f_project_id );
Expand All @@ -46,7 +46,7 @@
$t_bug_count = db_result( db_query_bound( $t_query, array( $f_category_id ) ) );

# Confirm with the user
helper_ensure_confirmed( sprintf( lang_get( 'category_delete_sure_msg' ), $t_name, $t_bug_count ),
helper_ensure_confirmed( sprintf( lang_get( 'category_delete_sure_msg' ), string_display_line( $t_name ), $t_bug_count ),
lang_get( 'delete_category_button' ) );

category_remove( $f_category_id );
Expand Down

0 comments on commit a374a7c

Please sign in to comment.