{"id":19002527,"date":"2026-08-25T12:24:32","date_gmt":"2026-08-25T12:24:32","guid":{"rendered":"https:\/\/wordpress.org\/support\/?post_type=topic&#038;p=19002527"},"modified":"2026-08-25T12:40:47","modified_gmt":"2026-08-25T12:40:47","slug":"nonce-bug","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/nonce-bug\/","title":{"rendered":"Nonce bug"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">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&#8217;s Memory Saver feature put the tab into &#8220;sleep mode&#8221;, so when I opened it, Chrome reloaded the page. The results disappeared (which might be expected), but after Chrome refreshed the page, the &#8220;Select tables&#8221; input was completely empty. I tried refreshing the page a few times, but &#8220;Select tables&#8221; 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&#8217;s results, and &#8220;Select tables&#8221; showed the DB tables correctly too. Maybe checking the nonce in the URL and redirecting on an invalid nonce would be a good idea.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Example URL: \/wp-admin\/tools.php?page=better-search-replace&amp;tab=bsr_search_replace&amp;result=true&amp;_wpnonce=anything<\/p>\n","protected":false},"template":"","class_list":["post-19002527","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19002527","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19002527\/revisions"}],"predecessor-version":[{"id":19002537,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19002527\/revisions\/19002537"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=19002527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}