Version Description
- Bug Fix - Redirects should no longer remove URL parameters.
- Bug Fix - Removed loginout filter that was changing links to plain text.
- Bug Fix - Plugin should no longer cause JavaScript errors from removing quotes from the end of URL's.
- Bug Fix - CSS backgrounds that do not have quotes should no longer break debug output.
Download this release
Release Info
Developer | Mvied |
Plugin | WordPress HTTPS (SSL) |
Version | 3.1.2 |
Comparing to | |
See all releases |
Code changes from version 3.1.1 to 3.1.2
- lib/Mvied/Plugin.php +1 -1
- lib/Mvied/Theme.php +1 -1
- lib/WordPressHTTPS.php +4 -0
- lib/WordPressHTTPS/Module/Admin/Settings.php +3 -3
- lib/WordPressHTTPS/Module/Filters.php +46 -29
- lib/WordPressHTTPS/Module/Parser.php +14 -14
- lib/WordPressHTTPS/Url.php +3 -3
- readme.txt +6 -1
- wordpress-https.php +2 -2
lib/Mvied/Plugin.php
CHANGED
@@ -423,7 +423,7 @@ class Mvied_Plugin {
|
|
423 |
unset($modules[$module]);
|
424 |
|
425 |
$this->_modules = $modules;
|
426 |
-
|
427 |
return $this;
|
428 |
}
|
429 |
|
423 |
unset($modules[$module]);
|
424 |
|
425 |
$this->_modules = $modules;
|
426 |
+
|
427 |
return $this;
|
428 |
}
|
429 |
|
lib/Mvied/Theme.php
CHANGED
@@ -211,7 +211,7 @@ class Mvied_Theme {
|
|
211 |
}
|
212 |
|
213 |
/**
|
214 |
-
* Set Theme Setting
|
215 |
*
|
216 |
* @param string $setting
|
217 |
* @param mixed $value
|
211 |
}
|
212 |
|
213 |
/**
|
214 |
+
* Set Theme Setting
|
215 |
*
|
216 |
* @param string $setting
|
217 |
* @param mixed $value
|
lib/WordPressHTTPS.php
CHANGED
@@ -339,6 +339,10 @@ class WordPressHTTPS extends Mvied_Plugin {
|
|
339 |
|
340 |
if ( $url ) {
|
341 |
$path = ( isset($_SERVER['REDIRECT_URL']) ? $_SERVER['REDIRECT_URL'] : $_SERVER['REQUEST_URI'] );
|
|
|
|
|
|
|
|
|
342 |
if ( $this->getHttpsUrl()->getPath() != '/' ) {
|
343 |
$path = str_replace($this->getHttpsUrl()->getPath(), '', $path);
|
344 |
}
|
339 |
|
340 |
if ( $url ) {
|
341 |
$path = ( isset($_SERVER['REDIRECT_URL']) ? $_SERVER['REDIRECT_URL'] : $_SERVER['REQUEST_URI'] );
|
342 |
+
if ( strpos($_SERVER['REQUEST_URI'], '?') !== false && isset($_SERVER['REDIRECT_URL']) && strpos($_SERVER['REDIRECT_URL'], '?') === false ) {
|
343 |
+
$path .= substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], '?'));
|
344 |
+
}
|
345 |
+
|
346 |
if ( $this->getHttpsUrl()->getPath() != '/' ) {
|
347 |
$path = str_replace($this->getHttpsUrl()->getPath(), '', $path);
|
348 |
}
|
lib/WordPressHTTPS/Module/Admin/Settings.php
CHANGED
@@ -189,16 +189,16 @@ class WordPressHTTPS_Module_Admin_Settings extends Mvied_Plugin_Module implement
|
|
189 |
|
190 |
if ( $ssl_host->toString() != $this->getPlugin()->getHttpsUrl()->toString() ) {
|
191 |
// Ensure that the WordPress installation is accessible at this host
|
192 |
-
if ( $ssl_host->isValid() ) {
|
193 |
// If secure domain has changed and currently on SSL, logout user
|
194 |
if ( $this->getPlugin()->isSsl() ) {
|
195 |
$logout = true;
|
196 |
}
|
197 |
$_POST[$key] = $ssl_host->setPort('');
|
198 |
-
} else {
|
199 |
$errors[] = '<strong>SSL Host</strong> - Invalid WordPress installation at ' . $ssl_host;
|
200 |
$_POST[$key] = get_option($key);
|
201 |
-
}
|
202 |
} else {
|
203 |
$_POST[$key] = $this->getPlugin()->getHttpsUrl()->toString();
|
204 |
}
|
189 |
|
190 |
if ( $ssl_host->toString() != $this->getPlugin()->getHttpsUrl()->toString() ) {
|
191 |
// Ensure that the WordPress installation is accessible at this host
|
192 |
+
//if ( $ssl_host->isValid() ) {
|
193 |
// If secure domain has changed and currently on SSL, logout user
|
194 |
if ( $this->getPlugin()->isSsl() ) {
|
195 |
$logout = true;
|
196 |
}
|
197 |
$_POST[$key] = $ssl_host->setPort('');
|
198 |
+
/*} else {
|
199 |
$errors[] = '<strong>SSL Host</strong> - Invalid WordPress installation at ' . $ssl_host;
|
200 |
$_POST[$key] = get_option($key);
|
201 |
+
}*/
|
202 |
} else {
|
203 |
$_POST[$key] = $this->getPlugin()->getHttpsUrl()->toString();
|
204 |
}
|
lib/WordPressHTTPS/Module/Filters.php
CHANGED
@@ -21,6 +21,8 @@ class WordPressHTTPS_Module_Filters extends Mvied_Plugin_Module implements Mvied
|
|
21 |
remove_filter('template_redirect', 'redirect_canonical');
|
22 |
// Filter SSL Host path out of request
|
23 |
add_filter('request', array(&$this, 'request'), 10, 1);
|
|
|
|
|
24 |
}
|
25 |
|
26 |
// Add SSL Host to allowed redirect hosts
|
@@ -29,35 +31,29 @@ class WordPressHTTPS_Module_Filters extends Mvied_Plugin_Module implements Mvied
|
|
29 |
// Filter get_avatar
|
30 |
add_filter('get_avatar', array(&$this, 'get_avatar'), 10, 5);
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
// Filter admin_url
|
33 |
add_filter('admin_url', array(&$this, 'admin_url'), 10, 3);
|
34 |
|
35 |
// Filter site_url
|
36 |
add_filter('site_url', array(&$this, 'site_url'), 10, 4);
|
37 |
|
38 |
-
// Filter bloginfo
|
39 |
-
add_filter('bloginfo_url', array(&$this, 'bloginfo_url'), 10, 2);
|
40 |
-
|
41 |
// Filter force_ssl
|
42 |
add_filter('force_ssl', array(&$this, 'secure_different_host_admin'), 20, 3);
|
43 |
add_filter('force_ssl', array(&$this, 'secure_child_post'), 30, 3);
|
44 |
add_filter('force_ssl', array(&$this, 'secure_post'), 40, 3);
|
45 |
add_filter('force_ssl', array(&$this, 'secure_exclusive'), 50, 3);
|
46 |
|
47 |
-
|
48 |
-
if ( $this->getPlugin()->isSsl() ) {
|
49 |
-
add_filter('template_directory_uri', array($this->getPlugin(), 'makeUrlHttps'), 10);
|
50 |
-
add_filter('stylesheet_directory_uri', array($this->getPlugin(), 'makeUrlHttps'), 10);
|
51 |
-
}
|
52 |
-
|
53 |
-
// Filter login/logout URL's
|
54 |
-
if ( $this->getPlugin()->isSsl() || $this->getPlugin()->getSetting('ssl_admin') ) {
|
55 |
-
add_filter('logout_url', array($this->getPlugin(), 'makeUrlHttps'), 10);
|
56 |
-
add_filter('login_url', array($this->getPlugin(), 'makeUrlHttps'), 10);
|
57 |
-
add_filter('loginout', array($this->getPlugin(), 'makeUrlHttps'), 10);
|
58 |
-
}
|
59 |
-
|
60 |
-
$filters = array('page_link', 'post_link', 'category_link', 'archives_link', 'tag_link', 'search_link');
|
61 |
foreach( $filters as $filter ) {
|
62 |
add_filter($filter, array(&$this, 'secure_post_link'), 10);
|
63 |
}
|
@@ -130,20 +126,19 @@ class WordPressHTTPS_Module_Filters extends Mvied_Plugin_Module implements Mvied
|
|
130 |
}
|
131 |
|
132 |
/**
|
133 |
-
*
|
134 |
-
* WordPress Filter - bloginfo_url
|
135 |
*
|
136 |
-
* @param string $
|
137 |
-
* @
|
138 |
-
* @return string $result
|
139 |
*/
|
140 |
-
public function
|
141 |
-
if ( $this->getPlugin()->isSsl() ) {
|
142 |
-
$
|
143 |
} else if ( strpos(get_option('home'), 'https') !== 0 ) {
|
144 |
-
$
|
145 |
}
|
146 |
-
return $
|
147 |
}
|
148 |
|
149 |
/**
|
@@ -154,8 +149,30 @@ class WordPressHTTPS_Module_Filters extends Mvied_Plugin_Module implements Mvied
|
|
154 |
* @return array $request
|
155 |
*/
|
156 |
public function request( $request ) {
|
157 |
-
|
158 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
}
|
160 |
|
161 |
/**
|
21 |
remove_filter('template_redirect', 'redirect_canonical');
|
22 |
// Filter SSL Host path out of request
|
23 |
add_filter('request', array(&$this, 'request'), 10, 1);
|
24 |
+
// Add SSL Host path to rewrite rules
|
25 |
+
add_filter('rewrite_rules_array', array(&$this, 'rewrite_rules'), 10, 1);
|
26 |
}
|
27 |
|
28 |
// Add SSL Host to allowed redirect hosts
|
31 |
// Filter get_avatar
|
32 |
add_filter('get_avatar', array(&$this, 'get_avatar'), 10, 5);
|
33 |
|
34 |
+
// Filter URL's
|
35 |
+
add_filter('bloginfo_url', array(&$this, 'secure_url'), 10);
|
36 |
+
add_filter('includes_url', array(&$this, 'secure_url'), 10);
|
37 |
+
add_filter('plugins_url', array(&$this, 'secure_url'), 10);
|
38 |
+
add_filter('logout_url', array(&$this, 'secure_url'), 10);
|
39 |
+
add_filter('login_url', array(&$this, 'secure_url'), 10);
|
40 |
+
add_filter('wp_get_attachment_url', array(&$this, 'secure_url'), 10);
|
41 |
+
add_filter('template_directory_uri', array(&$this, 'secure_url'), 10);
|
42 |
+
add_filter('stylesheet_directory_uri', array(&$this, 'secure_url'), 10);
|
43 |
+
|
44 |
// Filter admin_url
|
45 |
add_filter('admin_url', array(&$this, 'admin_url'), 10, 3);
|
46 |
|
47 |
// Filter site_url
|
48 |
add_filter('site_url', array(&$this, 'site_url'), 10, 4);
|
49 |
|
|
|
|
|
|
|
50 |
// Filter force_ssl
|
51 |
add_filter('force_ssl', array(&$this, 'secure_different_host_admin'), 20, 3);
|
52 |
add_filter('force_ssl', array(&$this, 'secure_child_post'), 30, 3);
|
53 |
add_filter('force_ssl', array(&$this, 'secure_post'), 40, 3);
|
54 |
add_filter('force_ssl', array(&$this, 'secure_exclusive'), 50, 3);
|
55 |
|
56 |
+
$filters = array('page_link', 'preview_page_link', 'post_link', 'preview_page_link', 'post_type_link', 'attachment_link', 'day_link', 'month_link', 'year_link', 'comment_reply_link', 'category_link', 'author_link', 'archives_link', 'tag_link', 'search_link');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
foreach( $filters as $filter ) {
|
58 |
add_filter($filter, array(&$this, 'secure_post_link'), 10);
|
59 |
}
|
126 |
}
|
127 |
|
128 |
/**
|
129 |
+
* Secure URL
|
130 |
+
* WordPress Filter - bloginfo_url, includes_url
|
131 |
*
|
132 |
+
* @param string $url
|
133 |
+
* @return string $url
|
|
|
134 |
*/
|
135 |
+
public function secure_url( $url = '' ) {
|
136 |
+
if ( $this->getPlugin()->isSsl() || ( $this->getPlugin()->getSetting('ssl_admin') && ( strpos($url, 'wp-admin') !== false || strpos($url, 'wp-login') !== false ) ) ) {
|
137 |
+
$url = rtrim($this->getPlugin()->makeUrlHttps(rtrim($url, '/') . '/'), '/');
|
138 |
} else if ( strpos(get_option('home'), 'https') !== 0 ) {
|
139 |
+
$url = rtrim($this->getPlugin()->makeUrlHttp(rtrim($url, '/') . '/'), '/');
|
140 |
}
|
141 |
+
return $url;
|
142 |
}
|
143 |
|
144 |
/**
|
149 |
* @return array $request
|
150 |
*/
|
151 |
public function request( $request ) {
|
152 |
+
if ( !is_admin() && ( sizeof($request) == 1 || isset($request['pagename']) ) ) {
|
153 |
+
$pagename = str_replace(trim($this->getPlugin()->getHttpsUrl()->getPath(), '/') . '/', '', ( isset($request['pagename']) ? $request['pagename'] : $_SERVER['REQUEST_URI'] ));
|
154 |
+
$request['pagename'] = rtrim(rtrim($this->getPlugin()->getHttpUrl()->getPath(), '/') . '/' . $pagename, '/');
|
155 |
+
}
|
156 |
+
return $request;
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Add rewrite rule to recognize additional path information on SSL Host
|
161 |
+
*
|
162 |
+
* @param array $rules
|
163 |
+
* @return array $rules
|
164 |
+
*/
|
165 |
+
public function rewrite_rules( $rules = array() ) {
|
166 |
+
$requestPath = str_replace($this->getPlugin()->getHttpsUrl()->getPath(), '', $_SERVER['REQUEST_URI']);
|
167 |
+
if ( $this->getPlugin()->getHttpUrl()->getPath() != '/' ) {
|
168 |
+
$httpsPath = str_replace($this->getPlugin()->getHttpUrl()->getPath(), '', $this->getPlugin()->getHttpsUrl()->getPath());
|
169 |
+
} else {
|
170 |
+
$httpsPath = $this->getPlugin()->getHttpsUrl()->getPath();
|
171 |
+
}
|
172 |
+
if ( $httpsPath != '/' ) {
|
173 |
+
$rules['^' . $httpsPath . '([^\'"]+)'] = 'index.php?pagename=$matches[1]';
|
174 |
+
}
|
175 |
+
return $rules;
|
176 |
}
|
177 |
|
178 |
/**
|
lib/WordPressHTTPS/Module/Parser.php
CHANGED
@@ -136,19 +136,19 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module implements Mvied_
|
|
136 |
if ( $this->getPlugin()->getSetting('ssl_host_diff') && !is_admin() && $GLOBALS['pagenow'] != 'wp-login.php' ) {
|
137 |
$url = clone $this->getPlugin()->getHttpsUrl();
|
138 |
$url->setScheme('http');
|
139 |
-
preg_match_all('/(' . str_replace('/', '\/', preg_quote($url->toString())) . '[^\'"]*)[\'"]?/im', $this->_html, $httpsMatches);
|
140 |
|
141 |
if ( $this->getPlugin()->isSsl() ) {
|
142 |
$url = clone $this->getPlugin()->getHttpUrl();
|
143 |
$url->setScheme('https');
|
144 |
-
preg_match_all('/(' . str_replace('/', '\/', preg_quote($url->toString())) . '[^\'"]*)[\'"]?/im', $this->_html, $httpMatches);
|
145 |
}
|
146 |
|
147 |
$matches = array_merge($httpMatches, $httpsMatches);
|
148 |
for ($i = 0; $i < sizeof($matches[0]); $i++) {
|
149 |
if ( isset($matches[1][$i]) ) {
|
150 |
$url_parts = parse_url($matches[1][$i]);
|
151 |
-
if ( $url_parts && strpos($url_parts['path'], 'wp-admin') === false && strpos($url_parts['path'], 'wp-login') === false ) {
|
152 |
$this->_html = str_replace($url, $this->getPlugin()->makeUrlHttp($url), $this->_html);
|
153 |
}
|
154 |
}
|
@@ -164,9 +164,9 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module implements Mvied_
|
|
164 |
*/
|
165 |
public function fixElements() {
|
166 |
if ( is_admin() ) {
|
167 |
-
preg_match_all('/\<(script|link|img)[^>]+[\'"]((http|https):\/\/[^\'"]+)[\'"][^>]*>/im', $this->_html, $matches);
|
168 |
} else {
|
169 |
-
preg_match_all('/\<(script|link|img|input|embed|param)[^>]+[\'"]((http|https):\/\/[^\'"]+)[\'"][^>]*>/im', $this->_html, $matches);
|
170 |
}
|
171 |
|
172 |
for ($i = 0; $i < sizeof($matches[0]); $i++) {
|
@@ -183,9 +183,9 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module implements Mvied_
|
|
183 |
( $type == 'input' && strpos($html, 'image') !== false ) ||
|
184 |
( $type == 'param' && strpos($html, 'movie') !== false )
|
185 |
) {
|
186 |
-
if ( $
|
187 |
$this->secureElement($url, $type);
|
188 |
-
} else if (
|
189 |
$this->unsecureElement($url, $type);
|
190 |
}
|
191 |
}
|
@@ -199,13 +199,13 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module implements Mvied_
|
|
199 |
* @return void
|
200 |
*/
|
201 |
public function fixCssElements() {
|
202 |
-
preg_match_all('/(import|background)[:]?[^u]*url\([\'"]?(http:\/\/[
|
203 |
for ($i = 0; $i < sizeof($matches[0]); $i++) {
|
204 |
$css = $matches[0][$i];
|
205 |
$url = $matches[2][$i];
|
206 |
-
if ( $this->getPlugin()->isSsl() ) {
|
207 |
$this->secureElement($url, 'style');
|
208 |
-
} else {
|
209 |
$this->unsecureElement($url, 'style');
|
210 |
}
|
211 |
}
|
@@ -247,9 +247,9 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module implements Mvied_
|
|
247 |
* @return void
|
248 |
*/
|
249 |
public function fixExtensions() {
|
250 |
-
@preg_match_all('/(http|https):\/\/[^\'"]+[\'"]+/i', $this->_html, $matches);
|
251 |
for ($i = 0; $i < sizeof($matches[0]); $i++) {
|
252 |
-
$url =
|
253 |
$filename = basename($url);
|
254 |
$scheme = $matches[1][$i];
|
255 |
|
@@ -265,9 +265,9 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module implements Mvied_
|
|
265 |
}
|
266 |
|
267 |
if ( strpos($filename, '.' . $extension) !== false ) {
|
268 |
-
if ( $this->getPlugin()->isSsl() ) {
|
269 |
$this->secureElement($url, $type);
|
270 |
-
} else {
|
271 |
$this->unsecureElement($url, $type);
|
272 |
}
|
273 |
}
|
136 |
if ( $this->getPlugin()->getSetting('ssl_host_diff') && !is_admin() && $GLOBALS['pagenow'] != 'wp-login.php' ) {
|
137 |
$url = clone $this->getPlugin()->getHttpsUrl();
|
138 |
$url->setScheme('http');
|
139 |
+
preg_match_all('/(' . str_replace('/', '\/', preg_quote($url->toString())) . '[^\'"\)]*)[\'"]?/im', $this->_html, $httpsMatches);
|
140 |
|
141 |
if ( $this->getPlugin()->isSsl() ) {
|
142 |
$url = clone $this->getPlugin()->getHttpUrl();
|
143 |
$url->setScheme('https');
|
144 |
+
preg_match_all('/(' . str_replace('/', '\/', preg_quote($url->toString())) . '[^\'"\)]*)[\'"]?/im', $this->_html, $httpMatches);
|
145 |
}
|
146 |
|
147 |
$matches = array_merge($httpMatches, $httpsMatches);
|
148 |
for ($i = 0; $i < sizeof($matches[0]); $i++) {
|
149 |
if ( isset($matches[1][$i]) ) {
|
150 |
$url_parts = parse_url($matches[1][$i]);
|
151 |
+
if ( $url_parts && strpos($url_parts['path'], $this->getPlugin()->getHttpsUrl()) !== false && strpos($url_parts['path'], 'wp-admin') === false && strpos($url_parts['path'], 'wp-login') === false ) {
|
152 |
$this->_html = str_replace($url, $this->getPlugin()->makeUrlHttp($url), $this->_html);
|
153 |
}
|
154 |
}
|
164 |
*/
|
165 |
public function fixElements() {
|
166 |
if ( is_admin() ) {
|
167 |
+
preg_match_all('/\<(script|link|img)[^>]+[\'"]((http|https):\/\/[^\'"\)]+)[\'"\)][^>]*>/im', $this->_html, $matches);
|
168 |
} else {
|
169 |
+
preg_match_all('/\<(script|link|img|input|embed|param)[^>]+[\'"]((http|https):\/\/[^\'"\)]+)[\'"\)][^>]*>/im', $this->_html, $matches);
|
170 |
}
|
171 |
|
172 |
for ($i = 0; $i < sizeof($matches[0]); $i++) {
|
183 |
( $type == 'input' && strpos($html, 'image') !== false ) ||
|
184 |
( $type == 'param' && strpos($html, 'movie') !== false )
|
185 |
) {
|
186 |
+
if ( $this->getPlugin()->isSsl() && ( $this->getPlugin()->getSetting('ssl_host_diff') || ( !$this->getPlugin()->getSetting('ssl_host_diff') && strpos($url, 'http://') === 0 ) ) ) {
|
187 |
$this->secureElement($url, $type);
|
188 |
+
} else if ( !$this->getPlugin()->isSsl() && strpos($url, 'https://') === 0 ) {
|
189 |
$this->unsecureElement($url, $type);
|
190 |
}
|
191 |
}
|
199 |
* @return void
|
200 |
*/
|
201 |
public function fixCssElements() {
|
202 |
+
preg_match_all('/(import|background)[:]?[^u]*url\([\'"]?(http:\/\/[^\'"\)]+)[\'"\)]?\)/im', $this->_html, $matches);
|
203 |
for ($i = 0; $i < sizeof($matches[0]); $i++) {
|
204 |
$css = $matches[0][$i];
|
205 |
$url = $matches[2][$i];
|
206 |
+
if ( $this->getPlugin()->isSsl() && ( $this->getPlugin()->getSetting('ssl_host_diff') || ( !$this->getPlugin()->getSetting('ssl_host_diff') && strpos($url, 'http://') === 0 ) ) ) {
|
207 |
$this->secureElement($url, 'style');
|
208 |
+
} else if ( !$this->getPlugin()->isSsl() && strpos($url, 'https://') === 0 ) {
|
209 |
$this->unsecureElement($url, 'style');
|
210 |
}
|
211 |
}
|
247 |
* @return void
|
248 |
*/
|
249 |
public function fixExtensions() {
|
250 |
+
@preg_match_all('/(http|https):\/\/[^\'"\)\s]+[\'"\)]+/i', $this->_html, $matches);
|
251 |
for ($i = 0; $i < sizeof($matches[0]); $i++) {
|
252 |
+
$url = $matches[0][$i];
|
253 |
$filename = basename($url);
|
254 |
$scheme = $matches[1][$i];
|
255 |
|
265 |
}
|
266 |
|
267 |
if ( strpos($filename, '.' . $extension) !== false ) {
|
268 |
+
if ( $this->getPlugin()->isSsl() && ( $this->getPlugin()->getSetting('ssl_host_diff') || ( !$this->getPlugin()->getSetting('ssl_host_diff') && strpos($url, 'http://') === 0 ) ) ) {
|
269 |
$this->secureElement($url, $type);
|
270 |
+
} else if ( !$this->getPlugin()->isSsl() && strpos($url, 'https://') === 0 ) {
|
271 |
$this->unsecureElement($url, $type);
|
272 |
}
|
273 |
}
|
lib/WordPressHTTPS/Url.php
CHANGED
@@ -376,7 +376,7 @@ class WordPressHTTPS_Url {
|
|
376 |
if ( function_exists('curl_init') ) {
|
377 |
$ch = curl_init();
|
378 |
|
379 |
-
curl_setopt($ch, CURLOPT_URL, $this->toString());
|
380 |
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER["HTTP_USER_AGENT"]);
|
381 |
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $verify_ssl);
|
382 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
@@ -413,7 +413,7 @@ class WordPressHTTPS_Url {
|
|
413 |
if ( function_exists('curl_init') ) {
|
414 |
$ch = curl_init();
|
415 |
|
416 |
-
curl_setopt($ch, CURLOPT_URL, $this->toString());
|
417 |
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER["HTTP_USER_AGENT"]);
|
418 |
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $verify_ssl);
|
419 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
@@ -479,7 +479,7 @@ class WordPressHTTPS_Url {
|
|
479 |
public static function fromString( $string ) {
|
480 |
$url = new WordPressHTTPS_Url;
|
481 |
|
482 |
-
@preg_match_all('/((http|https):\/\/[^\'"]+
|
483 |
if ( isset($url_parts[1][0]) ) {
|
484 |
if ( $url_parts = parse_url( $url_parts[1][0] ) ) {
|
485 |
foreach( $url_parts as $key => $value ) {
|
376 |
if ( function_exists('curl_init') ) {
|
377 |
$ch = curl_init();
|
378 |
|
379 |
+
curl_setopt($ch, CURLOPT_URL, rtrim($this->toString(), '\'"'));
|
380 |
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER["HTTP_USER_AGENT"]);
|
381 |
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $verify_ssl);
|
382 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
413 |
if ( function_exists('curl_init') ) {
|
414 |
$ch = curl_init();
|
415 |
|
416 |
+
curl_setopt($ch, CURLOPT_URL, rtrim($this->toString(), '\'"'));
|
417 |
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER["HTTP_USER_AGENT"]);
|
418 |
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $verify_ssl);
|
419 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
479 |
public static function fromString( $string ) {
|
480 |
$url = new WordPressHTTPS_Url;
|
481 |
|
482 |
+
@preg_match_all('/((http|https):\/\/[^\'"]+[\'"]?)/i', $string, $url_parts);
|
483 |
if ( isset($url_parts[1][0]) ) {
|
484 |
if ( $url_parts = parse_url( $url_parts[1][0] ) ) {
|
485 |
foreach( $url_parts as $key => $value ) {
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: security, encryption, ssl, shared ssl, private ssl, public ssl, private ssl, http, https
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.4
|
7 |
-
Stable tag: 3.1.
|
8 |
|
9 |
WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites.
|
10 |
|
@@ -76,6 +76,11 @@ add_filter('force_ssl', 'store_force_ssl', 10, 3);`
|
|
76 |
* SSL Domain Mapping
|
77 |
|
78 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
79 |
= 3.1.1 =
|
80 |
* Bug Fix - Fixed bug in Parser.
|
81 |
= 3.1 =
|
4 |
Tags: security, encryption, ssl, shared ssl, private ssl, public ssl, private ssl, http, https
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.4
|
7 |
+
Stable tag: 3.1.2
|
8 |
|
9 |
WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites.
|
10 |
|
76 |
* SSL Domain Mapping
|
77 |
|
78 |
== Changelog ==
|
79 |
+
= 3.1.2 =
|
80 |
+
* Bug Fix - Redirects should no longer remove URL parameters.
|
81 |
+
* Bug Fix - Removed loginout filter that was changing links to plain text.
|
82 |
+
* Bug Fix - Plugin should no longer cause JavaScript errors from removing quotes from the end of URL's.
|
83 |
+
* Bug Fix - CSS backgrounds that do not have quotes should no longer break debug output.
|
84 |
= 3.1.1 =
|
85 |
* Bug Fix - Fixed bug in Parser.
|
86 |
= 3.1 =
|
wordpress-https.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin URI: http://mvied.com/projects/wordpress-https/
|
5 |
Description: WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites.
|
6 |
Author: Mike Ems
|
7 |
-
Version: 3.1.
|
8 |
Author URI: http://mvied.com/
|
9 |
*/
|
10 |
|
@@ -48,7 +48,7 @@ spl_autoload_register('wphttps_autoloader');
|
|
48 |
if ( function_exists('get_bloginfo') && ! defined('WP_UNINSTALL_PLUGIN') ) {
|
49 |
$wordpress_https = new WordPressHTTPS;
|
50 |
$wordpress_https->setSlug('wordpress-https');
|
51 |
-
$wordpress_https->setVersion('3.1.
|
52 |
$wordpress_https->setLogger(WordPressHTTPS_Logger::getInstance());
|
53 |
$wordpress_https->setPluginUrl(plugins_url('', __FILE__));
|
54 |
$wordpress_https->setDirectory(dirname(__FILE__));
|
4 |
Plugin URI: http://mvied.com/projects/wordpress-https/
|
5 |
Description: WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites.
|
6 |
Author: Mike Ems
|
7 |
+
Version: 3.1.2
|
8 |
Author URI: http://mvied.com/
|
9 |
*/
|
10 |
|
48 |
if ( function_exists('get_bloginfo') && ! defined('WP_UNINSTALL_PLUGIN') ) {
|
49 |
$wordpress_https = new WordPressHTTPS;
|
50 |
$wordpress_https->setSlug('wordpress-https');
|
51 |
+
$wordpress_https->setVersion('3.1.2');
|
52 |
$wordpress_https->setLogger(WordPressHTTPS_Logger::getInstance());
|
53 |
$wordpress_https->setPluginUrl(plugins_url('', __FILE__));
|
54 |
$wordpress_https->setDirectory(dirname(__FILE__));
|