WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#39365 closed defect (bug) (fixed)

Site info always displays main site URL as http even if the URL scheme is https

Reported by: greatislander Owned by: flixos90
Milestone: 4.8 Priority: normal
Severity: normal Version: 4.5
Component: Networks and Sites Keywords: has-patch
Focuses: multisite Cc:

Description

Since [36682], the non-editable main site URL is always displayed as http in /wp-admin/network/site-info.php. The URL is constructed by applying esc_url() to a concatenated string composed of $details->domain and $details->path, which always results in an http URL because no URL scheme is provided. This is counterintuitive, as site-info.php reflects the actual URL scheme for all the other sites in a network.

Attachments (2)

39365.diff (596 bytes) - added by greatislander 4 years ago.
Patch from https://github.com/WordPress/WordPress/pull/262
39365.2.diff (583 bytes) - added by greatislander 4 years ago.
Patch from https://github.com/WordPress/WordPress/pull/263

Download all attachments as: .zip

Change History (9)

#1 @greatislander
4 years ago

The attached patch normalizes the main site URL display in site-info.php to include the URL scheme from $parsed_scheme as is the case for all other sites in a network.

#2 @flixos90
4 years ago

  • Focuses administration removed
  • Milestone changed from Awaiting Review to Future Release
  • Version changed from trunk to 4.5

Thanks for the patch @greatislander!

I think we should continue to use esc_url() to escape the entire URL here instead of using esc_attr() on the individual parts - other than that this looks like a solid change to make. :)

#3 @greatislander
4 years ago

@flixos90 Updated as per your feedback.

#4 @flixos90
4 years ago

  • Keywords has-patch added
  • Milestone changed from Future Release to 4.8
  • Owner set to flixos90
  • Status changed from new to reviewing

#5 @flixos90
4 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 39930:

Multisite: Display correct scheme for the main site in site-info.php.

Props greatislander.
Fixes #39365.

#6 @flixos90
4 years ago

#39786 was marked as a duplicate.

#7 @ocean90
4 years ago

#40235 was marked as a duplicate.

Note: See TracTickets for help on using tickets.