-
Notifications
You must be signed in to change notification settings - Fork 10
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
Skip SSL verification for IIS support. #58
base: master
Are you sure you want to change the base?
Conversation
@msigley many would probably want Perhaps it would be better to just throw in another $minify_action_priority = 10;
add_action( Dependency_Minification::CRON_MINIFY_ACTION, function () {
add_filter( 'https_local_ssl_verify', '__return_false' );
add_filter( 'https_ssl_verify', '__return_false' );
}, $minify_action_priority - 1 );
add_action( Dependency_Minification::CRON_MINIFY_ACTION, function () {
remove_filter( 'https_local_ssl_verify', '__return_false' );
remove_filter( 'https_ssl_verify', '__return_false' );
}, $minify_action_priority + 1 ); Too bad that |
We could also do an $is_IIS check as well and only disable the sslverify option in the HTTP request if IIS is detected. Let me know the direction you wish to go in and I will revise or revoke my pull request. |
@msigley does my plugin above not do the trick to turn off SSL verification on your site? |
It does, but this is still a IIS compatibility issue in the plugins implementation. Again virtually anyone running IIS will experience this issue. |
@@ -841,7 +841,7 @@ static function minify( $cached ) { | |||
|
|||
// Dependency is not self-hosted or it the filesystem read failed, so do HTTP request | |||
if ( false === $contents ) { | |||
$r = wp_remote_get( $src ); | |||
$r = wp_remote_get( $src, array( 'sslverify' => false ) ); |
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.
@msigley I think this should be changed to be something like this:
$sslverify = apply_filters( 'depmin_https_ssl_verify', empty( $GLOBALS['is_IIS'] ), $src );
$r = wp_remote_get( $src, compact( 'sslverify' ) );
This then turns off SSL verification for IIS only by default, but also allows it to be filtered.
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.
Looks good to me. Merge and revise in a commit. Nice work @westonruter!
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.
@msigley are you going to add another commit to your PR with this change?
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.
Commited the changes requested
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.
@westonruter do the changes meet your approval?
@msigley I was trying to apply your patch to the Also, before doing another plugin release ( |
Fixes issue #57.