Skip to content

Commit c0efe54

Browse files
committed
Use print_form_button() instead of print_small_button()
Avoids sending the form security token as a get parameter. This reverts commit cf6cbd3 (i.e. reapplies 787eaa8 including the follow-up fix 634277d). Fixes #372
1 parent 29cdc3c commit c0efe54

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Source/pages/view.php

+7-6
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ function( $p_bug_id ) use ( $t_view_bug_threshold ) {
187187
<?php
188188
$t_first = true;
189189
$t_user_id = auth_get_current_user_id();
190-
$t_security_token = form_security_param( 'plugin_Source_detach' );
190+
$t_security_token = form_security_token( 'plugin_Source_detach' );
191191

192192
foreach ( $t_bug_rows as $t_bug_id => $t_bug_row ) {
193193
$t_color_class = html_get_status_css_fg(
@@ -215,11 +215,12 @@ function( $p_bug_id ) use ( $t_view_bug_threshold ) {
215215
</td>
216216
<?php if ( $t_can_update ) { ?>
217217
<td class="center"><?php
218-
$t_param = array( 'id' => $t_changeset->id, 'bug_id' => $t_bug_id);
219-
print_small_button(
220-
plugin_page( 'detach' )
221-
. '&' . http_build_query( $t_param ) . $t_security_token,
222-
plugin_lang_get( 'detach' )
218+
print_form_button(
219+
plugin_page( 'detach' ),
220+
plugin_lang_get( 'detach' ),
221+
array( 'id' => $t_changeset->id, 'bug_id' => $t_bug_id),
222+
$t_security_token,
223+
'btn btn-round btn-white btn-primary btn-sm'
223224
) ?>
224225
</td>
225226
<?php } ?>

0 commit comments

Comments
 (0)