Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
dregad opened this issue May 13, 2021 · 1 comment
Closed

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

dregad opened this issue May 13, 2021 · 1 comment

Comments

@dregad
Copy link
Member

dregad commented May 13, 2021

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
Copy link
Member Author

dregad commented May 13, 2021

Initial attempt to fix this (see 787eaa8) 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 634277d).

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 added a commit that referenced this issue May 13, 2021
Trying to detach an Issue from a Changeset always results in
APPLICATION ERROR 2800 - Invalid form security token, even when using
a valid token.

This is because print_form_button() currently does not work with action
URLs generated by plugin_page(), see [1].

So we revert to original behavior of using print_small_button() (as it
was before commit 787eaa8), but keeping
the single form security token implemented in commit
634277d.

This change can be reverted again, once the upstream issue has been
fixed.

Issue #372

[1]: https://mantisbt.org/bugs/view.php?id=28533
@dregad dregad modified the milestones: 2.6.0, 2.7.0 Jul 15, 2022
dregad added a commit that referenced this issue Jan 4, 2024
This is a prerequisite to fix issue #372.
@dregad dregad closed this as completed in c0efe54 Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant