source-integration icon indicating copy to clipboard operation
source-integration copied to clipboard

Use print_form_button() to display "Detach" buttons in view page

Open dregad opened this issue 3 years ago • 1 comments

Current use of print_small_button() generates a complex GET URL showing the form security token. It would be better to use print_form_button() so the token is handled as hidden form parameter.

Moreover multiple tokens are generated (one per issue), which is not efficient,

dregad avatar May 13 '21 16:05 dregad

Initial attempt to fix this (see 787eaa84ce7a68ead27ceafe2491f27fb6dad707) actually does not work - the Detach button always throws APPLICATION ERROR 2800 - Invalid form security token.

The problem persists even after fixing the problem with the invalid token (see 634277d2ea5995a723c97bfe5964a0412e164cb9).

This is because print_form_button() currently does not work with action URLs generated by plugin_page(), see MantisBT issue #28533.

This change has to be reverted for now and put on hold until the upstream problem has been fixed, probably in MantisBT 2.26.0 (PR mantisbt/mantisbt#1753).

dregad avatar May 13 '21 17:05 dregad