From c6e4082a70949e082dda28501e355128f871e7e9 Mon Sep 17 00:00:00 2001 From: Brent Shepherd Date: Thu, 1 Sep 2011 00:45:57 +1000 Subject: [PATCH] Fixing SSL issues with facebook connect. Tagging & bagging 0.9 --- readme.txt | 8 +++++++- social-connect.php | 2 +- utils.php | 12 ++++++++---- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/readme.txt b/readme.txt index bcfb00d..f0d46e6 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: thenbrent Tags: facebook, wordpress.com, twitter, google, yahoo, social, login, register Requires at least: 3.0 Tested up to: 3.2.1 -Stable tag: 0.8 +Stable tag: 0.9 Allow your visitors to comment, login and register with their Twitter, Facebook, Google, Yahoo or WordPress.com account. @@ -96,6 +96,9 @@ If you don't have White Label CMS installed, please double check your settings t == Changelog == += 0.9 = +* Setting CURLOPT_SSL_VERIFYPEER to false + = 0.8 = * Moving comments icons to top of comment form (using `comment_form_top` hook instead of `comment_form` hook) * No longer relying on `file_get_contents()` function (using custom `sc_curl_get_contents()` function) @@ -133,6 +136,9 @@ If you don't have White Label CMS installed, please double check your settings t == Upgrade Notice == += 0.9 = +* Upgrade to fix Facebook connect SSL bug effecting some servers. + = 0.8 = * Upgrade to fix bugs affecting Facebook connect on certain servers. diff --git a/social-connect.php b/social-connect.php index 185daeb..7142ce7 100644 --- a/social-connect.php +++ b/social-connect.php @@ -3,7 +3,7 @@ Plugin Name: Social Connect Plugin URI: http://wordpress.org/extend/plugins/social-connect/ Description: Allow your visitors to comment, login and register with their Twitter, Facebook, Google, Yahoo or WordPress.com account. -Version: 0.8 +Version: 0.9 Author: Brent Shepherd Author URI: http://wordpress.org/extend/plugins/social-connect/ License: GPL2 diff --git a/utils.php b/utils.php index 7777db7..9575eb4 100644 --- a/utils.php +++ b/utils.php @@ -23,9 +23,13 @@ function social_connect_verify_signature( $data, $signature, $redirect_to ) { function sc_curl_get_contents( $url ) { $curl = curl_init(); - curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($curl, CURLOPT_URL, $url); - $html = curl_exec($curl); - curl_close($curl); + curl_setopt( $curl, CURLOPT_RETURNTRANSFER, 1 ); + curl_setopt( $curl, CURLOPT_URL, $url ); + curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, false ); + + $html = curl_exec( $curl ); + + curl_close( $curl ); + return $html; }