-
Bug
-
Resolution: Fixed
-
Should have
-
3
-
Admin Panel
Because WordPress by default relies on the HTTP_REFERER header to redirect to the post again after entering the correct password, this sometimes fails, because the referer header is unreliable.
In case of Chrome, it currently only includes the root domain. In our case this is not even the root URL of the site, but a global redirection page.
We can solve this by including a
_wp_http_referer
query parameter in the search form with the post URL. This should work as it's being preferred by WordPress. See https://github.com/WordPress/WordPress/blob/master/wp-includes/functions.php#L1940-L1948