Skip to content

Commit

Permalink
Add CSRF protection for bug_monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhicks committed Jul 6, 2009
1 parent 533a038 commit 1e192e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bug_monitor.php
Expand Up @@ -29,7 +29,7 @@

require_once( 'bug_api.php' );

# helper_ensure_post();
form_security_validate( 'bug_monitor' );

$f_bug_id = gpc_get_int( 'bug_id' );
$t_bug = bug_get( $f_bug_id, true );
Expand Down Expand Up @@ -67,4 +67,6 @@
bug_monitor( $f_bug_id, $t_user_id );
}

form_security_purge( 'bug_monitor' );

print_successful_redirect_to_bug( $f_bug_id );
1 change: 1 addition & 0 deletions bug_monitor_list_view_inc.php
Expand Up @@ -75,6 +75,7 @@
echo '<br /><br />', lang_get( 'username' );
?>
<form method="get" action="bug_monitor.php">
<?php echo form_security_field( 'bug_monitor' ) ?>
<input type="hidden" name="bug_id" value="<?php echo (integer)$f_bug_id; ?>" />
<input type="hidden" name="action" value="add" />
<input type="text" name="username" />
Expand Down

0 comments on commit 1e192e9

Please sign in to comment.