Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 3 years ago

#36993 closed enhancement (fixed)

Update links to HTTPS

Reported by: bhubbard's profile bhubbard Owned by: johnpgreen's profile johnpgreen
Milestone: 4.6 Priority: normal
Severity: normal Version: 4.6
Component: General Keywords: good-first-bug has-patch commit
Focuses: docs Cc:

Description

There are many links within WordPress that should be updated to HTTPS by default. You can see a quick example here:

https://github.com/WordPress/WordPress/search?utf8=%E2%9C%93&q=http%3A%2F%2F

A few example of domain links that can be updated to https:

Attachments (2)

36993.patch (51.4 KB) - added by johnpgreen 8 years ago.
36993.2.patch (50.3 KB) - added by johnpgreen 8 years ago.

Download all attachments as: .zip

Change History (13)

#1 in reply to: ↑ description @netweb
8 years ago

  • Focuses docs added
  • Keywords good-first-bug added

Previously #27115, and to note that *ALL* of the below URLs already redirect to their HTTPS enabled site automatically:

A few example of domain links that can be updated to https:

Also:

#2 @johnpgreen
8 years ago

If @bhubbard isn't interested, I would like to tackle this issue as my first bug.

#3 @bhubbard
8 years ago

@johnpgreen Feel free to give it a go.

#4 @jeremyfelt
8 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release
  • Owner set to johnpgreen
  • Status changed from new to assigned

@johnpgreen
8 years ago

#5 @johnpgreen
8 years ago

  • Keywords has-patch added; needs-patch removed

First attempt at patch attached.

I searched the source code for the string "http://" and replaced with the resolved "https://" URL when they both resolved to identical pages. This includes standardizing all PHP.net references to the "secure" subdomain.

I avoided making any modifications to URLs that returned 404 errors on both http and https.

I also avoided touching any files that seemed to be included libraries (i.e. SimplePie, ID3), as I assume that's up to their respective maintainers.

#6 @netweb
8 years ago

  • Keywords needs-refresh added

Awesome @johnpgreen, patch looks great, nice work on the URLs you didn't change +1

A couple of issues if you could refresh your patch with these changes please:

  • Remove the harvard.edu HTTPS change and leave it as HTTP, there are mixed content warnings and even though the certificate appears valid I'm not confident in the hardvard.edu HTTPS configuration I see, anyone else with opinions? See https://cyber.law.harvard.edu
  • Changehttp://php.net/date to https://secure.php.net/date, they both redirect to the same location https://secure.php.net/manual/en/function.date.php and the "short url" helps keep comment line lengths shorter.
  • I don't think we should use any shortlink services for URLs in WordPress, change https://bit.ly/89QxZA to https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system

@johnpgreen
8 years ago

#7 @johnpgreen
8 years ago

  • Keywords needs-refresh removed

Attached is a refreshed patch, with:

  • the Harvard update undone
  • the shorter version of the PHP date() URL
  • the expanded version of the Wikipedia URL (which I was surprised to find as a shortened URL in the first place).

#8 @netweb
8 years ago

  • Keywords commit added

36993.2.patch looks good @johnpgreen, thanks +1

#9 @peterwilsoncc
8 years ago

  • Milestone changed from Future Release to 4.6

#10 @peterwilsoncc
8 years ago

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

In 37674:

DOCS: Replace HTTP links with HTTPS.

Replaces unsecure links in documentation and translator comments with their secure versions.

Props johnpgreen, netweb

Fixes #36993

#11 @SergeyBiryukov
8 years ago

In 38239:

Docs: Replace some more HTTP links with HTTPS.

Props johnpgreen.
Fixes #37622. See #36993.

Note: See TracTickets for help on using tickets.