Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#40235 closed defect (bug) (duplicate)

Site Address (URL) in network/site-info.php for primary site always prefixed http://

Reported by: bobbingwide's profile bobbingwide Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.5
Component: Networks and Sites Keywords:
Focuses: multisite Cc:

Description

While switching a WordPress Multisite network to https, I noticed that on Edit site for the primary site,
wp-admin/network/site-info.php?id=1, the Site Address (URL) field was displayed as http://example.com even though I was using https:// to access the site.

I would have expected it to be https://example.com

Explanation

esc_url() assumes the http:// if the URL doesn't contain a scheme.

Proposed solution

Use logic similar to that in network_home_url().

Change History (2)

#1 @bobbingwide
8 years ago

  • Keywords needs-patch added

Simple solution would be to wrap esc_url() with set_url_scheme()

echo set_url_scheme( esc_url( $details->domain . $details->path ));

#2 @ocean90
8 years ago

  • Keywords needs-patch removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version changed from trunk to 4.5

Duplicate of #39365.

Note: See TracTickets for help on using tickets.