Nonce bug
-
I found a small bug in the plugin when I started a search, forgot about the browser tab, and opened it a day later. As a day had passed, Chrome’s Memory Saver feature put the tab into “sleep mode”, so when I opened it, Chrome reloaded the page. The results disappeared (which might be expected), but after Chrome refreshed the page, the “Select tables” input was completely empty. I tried refreshing the page a few times, but “Select tables” stayed empty. I even checked the browser logs for frontend errors, but there was nothing. Then I realized there was a _wpnonce parameter in the URL, which seemed to have already expired. As soon as I removed the nonce parameter, the page loaded correctly. I even saw the last run’s results, and “Select tables” showed the DB tables correctly too. Maybe checking the nonce in the URL and redirecting on an invalid nonce would be a good idea.
Example URL: /wp-admin/tools.php?page=better-search-replace&tab=bsr_search_replace&result=true&_wpnonce=anything
You must be logged in to reply to this topic.