Make WordPress Core

Opened 6 years ago

Last modified 6 years ago

#44991 new defect (bug)

wp-login.php postpass no redirect

Reported by: lukelr's profile lukelr Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.9.8
Component: Posts, Post Types Keywords: needs-testing 2nd-opinion
Focuses: Cc:

Description

I'm running wordpress 4.9.8 on an Archlinux host. Whenever I try to password protect a post, the redirection after entering the correct password fails. Going back to the post using the browser history works, and the post is unlocked, but only a blank page is visible to the user after entering the password.

I suspect

wp_get_referer();

to be the root of the problem. I've added some debug output to the code:

$referer = wp_get_referer();
if ( $referer ) {
	$secure = ( 'https' === parse_url( $referer, PHP_URL_SCHEME ) );
	print "True";
} else {
	$secure = false;
	print "False";
}

and it prints "False" on that formerly blank white page after entering the password. Also adding

print $referer;
print $_SERVER['HTTP_REFERER'];

to the code prints nothing.

I've tested different up-to-date browsers: Firefox, Chromium on Linux, Firefox, Opera on Windows 8.1, Firefox Klar, Safari on iOS, to no avail. Only Internet Explorer on Windows 8.1 works as expected, the redirect occurs immediately.

Any ideas what could cause this problem, or how to further debug this?

Change History (2)

#1 @mukesh27
6 years ago

  • Focuses accessibility added
  • Keywords needs-testing 2nd-opinion worksforme added

Hi @lukelr, Welcome to WordPress Trac! Thank you for your ticket.

i have checked above mention issue in Linux Google chrome version 69.0.3497.81 and Firefox version 62.0 but it working fine for me can you please check same issue with clean WordPress installation and with default Twenty Seventeen theme without any plugins.

#2 @SergeyBiryukov
6 years ago

  • Component changed from Login and Registration to Posts, Post Types
  • Focuses accessibility removed
  • Keywords worksforme removed
Note: See TracTickets for help on using tickets.