-
Notifications
You must be signed in to change notification settings - Fork 191
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
Clean up Donor search results URLs #1175
Milestone
Comments
@DevinWalker I found that we have the same issue on donor page and donor tab under report page. |
ravinderk
added a commit
to ravinderk/Give
that referenced
this issue
Jan 17, 2017
DevinWalker
pushed a commit
that referenced
this issue
Jan 17, 2017
DevinWalker
pushed a commit
that referenced
this issue
Jan 17, 2017
…o release/1.8 * 'release/1.8' of https://github.com/WordImpress/Give: Remove unused code from forms_dropdown fx Show untitled form name under form list on domation edit page Fix wrong View API Log url Fix ajax user seach results list not showing bug Fix #1175 Show unname donation form title in widget under form listing Save default currency position on fresh install
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue Overview
When searching for Donors, the search results URLs contain
_wpnonce
and_wp_http_referer
query args. These args should be removed prior to redirection.Example URL for Search Results from Donor Reports Tab
http://give.dev/wp-admin/edit.php?_wpnonce=577d19d542&_wp_http_referer=%2Fwp-admin%2Fedit.php%3Fpost_type%3Dgive_forms%26page%3Dgive-reports%26tab%3Ddonors&s=test&paged=1&post_type=give_forms&page=give-reports&tab=donors
Expected Behavior
The search results URL should not contain
_wpnonce
and_wp_http_referer
query args.Current Behavior
_wpnonce
and_wp_http_referer
query args are present in search results URLs. The_wp_http_referer
query arg compounds in length with each successive search.Possible Solution
I looked into how WP core handles nonce fields during a search query, and I found that those arguments are removed in
edit.php
prior to redirecting to search results. Here are the relevant lines: https://github.com/WordPress/WordPress/blob/master/wp-admin/edit.php#L175-L178I tried placing that same code at the top of
reports.php
:However, that code results in
Fatal error: Uncaught Error: Call to undefined function wp_redirect()
.We should determine if the nonce field is even serving a purpose here, or alternatively find a way to remove the query args from the URL.
Steps to Reproduce (for bugs)
1.8.0
._wpnonce
and_wp_http_referer
query args in the URL._wp_http_referer
compounds in length.Todos
The text was updated successfully, but these errors were encountered: