Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#40235 closed defect (bug) (duplicate)

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

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

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
9 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
9 years ago

  • Keywords needs-patch removed
  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed
  • Version trunk4.5

Duplicate of #39365.

Note: See TracTickets for help on using tickets.