Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#50588 closed defect (bug) (fixed)

Health Check REST-API error message disrupts leftside linkstructure when htpasswd is in place

Reported by: gisselfeldt's profile gisselfeldt Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.5 Priority: normal
Severity: minor Version: 5.4.2
Component: Site Health Keywords:
Focuses: Cc:

Description

When having a site behind htpasswd and accessing the Tools > Site Health, the entire linkstructure in the leftside menu is disrupted and replaced with /error_docs/ instead of /wp-admin/.

Reference in the code is:

<!DOCTYPE HTML PUBLIC \"-\/\/IETF\/\/DTD HTML 2.0\/\/EN\">\n<HTML>\n<HEAD>\n<TITLE>401 Authorization Required<\/TITLE>\n<BASE href=\"\/error_docs\/\"><!--[if lte IE 6]><\/BASE>

which is applied to the REST-API-error message in the SiteHealth script.

Attachments (1)

50588.diff (594 bytes) - added by siliconforks 4 years ago.
A simple 1-line fix.

Download all attachments as: .zip

Change History (3)

@siliconforks
4 years ago

A simple 1-line fix.

#1 @SergeyBiryukov
4 years ago

  • Milestone changed from Awaiting Review to 5.5

#2 @SergeyBiryukov
4 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 48608:

Site Health: Escape the displayed result of the request in REST API availability test.

Props siliconforks, gisselfeldt.
Fixes #50588.

Note: See TracTickets for help on using tickets.