-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Use HTTPS for rpc.pingomatic.com (Update Services) #9085
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
peterwilsoncc
wants to merge
4
commits into
WordPress:trunk
from
peterwilsoncc:fix/42007-pingomatic-upgrade-routine
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
5ee63d3
Use HTTPS for rpc.pingomatic.com
sabernhardt bc1f2a6
Update unit test to check both HTTP and HTTPS
sabernhardt 0156113
Upgrade routine: pingomatic URLs to use HTTPS.
peterwilsoncc df99daf
Update rpc.twingly.com to use https in upgrade routine.
peterwilsoncc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -881,6 +881,11 @@ function upgrade_all() { | |
if ( $wp_current_db_version < 58975 ) { | ||
upgrade_670(); | ||
} | ||
|
||
if ( $wp_current_db_version < 60344 ) { | ||
upgrade_682(); | ||
} | ||
|
||
maybe_disable_link_manager(); | ||
|
||
maybe_disable_automattic_widgets(); | ||
|
@@ -2439,6 +2444,42 @@ function upgrade_670() { | |
wp_set_options_autoload( $options, false ); | ||
} | ||
} | ||
|
||
/** | ||
* Executes changes made in WordPress 6.8.2. | ||
* | ||
* @ignore | ||
* @since 6.8.2 | ||
* | ||
* @global int $wp_current_db_version The old (current) database version. | ||
*/ | ||
function upgrade_682() { | ||
global $wp_current_db_version; | ||
|
||
if ( $wp_current_db_version < 60344 ) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As above. |
||
// Upgrade Ping-O-Matic and Twingly to use HTTPS. | ||
$ping_sites_value = get_option( 'ping_sites' ); | ||
$ping_sites_value = explode( "\n", $ping_sites_value ); | ||
$ping_sites_value = array_map( | ||
function ( $url ) { | ||
$url = trim( $url ); | ||
$url = sanitize_url( $url ); | ||
if ( | ||
str_ends_with( trailingslashit( $url ), '://rpc.pingomatic.com/' ) | ||
|| str_ends_with( trailingslashit( $url ), '://rpc.twingly.com/' ) | ||
) { | ||
$url = set_url_scheme( $url, 'https' ); | ||
} | ||
return $url; | ||
}, | ||
$ping_sites_value | ||
); | ||
$ping_sites_value = array_filter( $ping_sites_value ); | ||
$ping_sites_value = implode( "\n", $ping_sites_value ); | ||
update_option( 'ping_sites', $ping_sites_value ); | ||
} | ||
} | ||
|
||
/** | ||
* Executes network-level upgrade routines. | ||
* | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ | |
* | ||
* @global int $wp_db_version | ||
*/ | ||
$wp_db_version = 58975; | ||
$wp_db_version = 60344; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As above. |
||
|
||
/** | ||
* Holds the TinyMCE version. | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Committers: When doing the commit to trunk this should be changed to the commit number in which it will appear. IE latest commit + 1.