WordPress HTTPS (SSL) - Version 2.0.2

Version Description

  • Bug Fix - SSL Host option was not being saved correctly upon subsiquent saves. This was causing redirect loops for most users.
Download this release

Release Info

Developer Mvied
Plugin Icon wp plugin WordPress HTTPS (SSL)
Version 2.0.2
Comparing to
See all releases

Code changes from version 2.0.1 to 2.0.2

Files changed (2) hide show
  1. readme.txt +200 -198
  2. wordpress-https.php +38 -34
readme.txt CHANGED
@@ -1,199 +1,201 @@
1
- === WordPress HTTPS (SSL) ===
2
- Contributors: Mvied
3
- Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=N9NFVADLVUR7A
4
- Tags: security, encryption, ssl, shared ssl, private ssl, public ssl, private ssl, http, https
5
- Requires at least: 2.7.0
6
- Tested up to: 3.2.1
7
- Stable tag: 2.0.1
8
-
9
- WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites.
10
-
11
- == Description ==
12
- <ul>
13
- <li>Supports Shared and Private SSL.</li>
14
- <li>Helps reduce or completely fix partially encrypted / mixed content errors.</li>
15
- <li>Force SSL on a per-page basis.</li>
16
- <li>Force SSL in admin panel.</li>
17
- </ul>
18
-
19
- If you're having partially encrypted/mixed content errors or other problems, please read the <a href="http://wordpress.org/extend/plugins/wordpress-https/faq/">FAQ</a>. If you're still having trouble, please <a href="http://wordpress.org/tags/wordpress-https#postform">start a support topic</a> and I will do my best to assist you.
20
-
21
- == Installation ==
22
-
23
- 1. Upload the `wordpress-https` folder to the `/wp-content/plugins/` directory.
24
- 1. Activate the plugin through the 'Plugins' menu in WordPress.
25
-
26
- == Frequently Asked Questions ==
27
-
28
- = How do I make my whole website secure? =
29
-
30
- To make your entire website secure, you simply need to change your home url and site url to use HTTPS instead of HTTP. Please read <a href="http://codex.wordpress.org/Changing_The_Site_URL" target="_blank">how to change the site url</a>.
31
-
32
- = How do I make only certain pages secure? =
33
-
34
- In the Publish box on the add/edit post screen, a checkbox for 'Force SSL' has been added to make this process easy. See Screenshots if you're having a hard time finding it.
35
-
36
- = I'm getting 404 errors on all of my pages. Why? =
37
-
38
- If you're using a public/shared SSL, try disabling your custom permalink structure. Some public/shared SSL's have issues with WordPress' permalinks because of the way they are configured.
39
-
40
- = How do I fix partially encrypted/mixed content errors? =
41
-
42
- To identify what is causing your page(s) to be insecure, please follow the instructions below.
43
- <ol>
44
- <li>Download <a href="http://www.google.com/chrome" target="_blank">Google Chrome</a>.</li>
45
- <li>Open the page you're having trouble with in Google Chrome.</li>
46
- <li>Open the Developer Tools. <a href="http://code.google.com/chrome/devtools/docs/overview.html#access" target="_blank">How to access the Developer Tools.</a></li>
47
- <li>Click on the Console tab.</li>
48
- </ol>
49
- For each item that is making your page partially encrypted, you should see an entry in the console similar to "The page at https://www.example.com/ displayed insecure content from http://www.example.com/." Note that the URL that is loading insecure content is HTTP and not HTTPS.
50
-
51
- If you see any external elements (not hosted no your server) that are loading over HTTP, try enabling the 'External HTTPS Elements' option in the WordPress HTTPS settings.
52
-
53
- Any other insecure content warnings can generally be resolved by changing absolute references to elements, or removing the insecure elements from the page completely. Although WordPress HTTPS does its best to fix all insecure content, there are a few cases that are impossible to fix.
54
- <ul>
55
- <li>Elements loaded via JavaScript that are hard-coded to HTTP. Usually this can be fixed by altering the JavaScript calling these elements.</li>
56
- <li>External elements that can not be delivered over HTTPS. These elements will have to be removed from the page, or hosted locally so that they can be loaded over HTTPS.</li>
57
- <li>YouTube videos - YouTube does not allow videos to be streamed over HTTPS. YouTube videos will have to be removed from secure pages.</li>
58
- <li>Google Maps - Loading Google maps over HTTPS requires a Google Maps API Premiere account. (<a href="http://code.google.com/apis/maps/faq.html#ssl" target="_blank">source</a>)</li>
59
- </ul>
60
-
61
- = Is there a hook or filter to force pages to be secure? =
62
-
63
- Yes! Here is an example of how to use the 'force_ssl' hook to force a page to be secure.
64
- <code>
65
- function custom_force_ssl( $force_ssl, $post_id ) {
66
- if ( $post_id == 5 ) {
67
- return true
68
- }
69
- return $force_ssl;
70
- }
71
-
72
- add_filter('force_ssl' , 'custom_force_ssl', 10, 2);
73
- </code>
74
-
75
- == Screenshots ==
76
- 1. WordPress HTTPS Settings screen
77
- 2. Force SSL checkbox added to add/edit posts screen
78
-
79
- == Changelog ==
80
-
81
- = 2.0.1 =
82
- * Ensured that deprected options are removed from a WordPress installation when activating the plugin.
83
- * Added an option to the WordPress HTTPS settings page to delete the cache of external links.
84
- * Bug Fix - URL's entered for SSL Host were not validing correctly.
85
- * Bug Fix - External URL's were not always being identified as valid external elements.
86
- * Bug Fix - Slight enhancement to SSL detection.
87
- = 2.0 =
88
- * Full support for using a custom SSL port has been added. A special thanks to <a href="http://chrisdoingweb.com/">Chris "doingweb" Antes</a> for his feedback and testing of this feature.
89
- * Forcing pages to/from HTTPS is now pluggable using the 'force_ssl' filter.
90
- * When using Force Shared SSL Admin, links to the admin panel will always be rewritten with the Shared SSL Host.
91
- * When using Shared SSL, all links to post and pages from within the admin panel will use the Shared SSL Host to retain administration functionality on those pages.
92
- * Redirects to the admin panel now hook into wp_redirect rather than using the auth_redirect pluggable function.
93
- * Canonical redirects will now still occur on sites usinga different SSL Host, but not on secure pages.
94
- * Cookies are now set with hooks rather than pluggable functions.
95
- * Plugin will now delete all options and custom metadata when uninstalled.
96
- * Added a HTTP_X_FORWARDED_PROTO check to the is_ssl function.
97
- * Internal HTTPS Elements option has been removed. Disabling this option was never a good idea, so it was removed and the plugin will always act as it did when this option was enabled.
98
- * External HTTPS Elements option has been removed. The handling of external elements has improved in such a way that this option is no longer required.
99
- * Disable Automatic HTTPS option has been removed. This option should have generally been enabled anyway.
100
- * Bug Fix - After logging in, the logged_in cookie was not being set properly. This caused the admin bar to not show up in both HTTP and HTTPS.
101
- * Bug Fix - When using Shared SSL, the login page would not honor the redirect_to variable after a successful login.
102
- = 1.9.2 =
103
- * Added External URL caching to the plugin so that external elements will only be checked for once, increasing the speed of sites not using the Bypass External Check option.
104
- * Any forms whose action points to page that has the Forced SSL option on will be updated to HTTPS even on HTTP pages.
105
- * Bug Fix - When using Shared SSL, permalink structure was being buggy.
106
- * Bug Fix - Certain server configurations were causing the plugin to create redirect loops when using the Force SSL Exclusively option.
107
- = 1.9.1 =
108
- * Bug Fix - Cookies were not being set to the correct paths when logging in, causing logins to fail.
109
- * Bug Fix - Links to the front page when using latest posts were not correctly being set to HTTP/HTTPS.
110
- * Bug Fix - When using Shared SSL, the HTTPS version of the site_url was not being correctly replaced with the Shared SSL URL for internal elements.
111
- * Bug Fix - When using Shared SSL, the admin login page was not always redirecting properly due to output buffering.
112
- * Bug Fix - When using Shared SSL, the auth_redirect function was not redirecting to the Shared SSL URL.
113
- * Bug Fix - If the home_url contained 'www' but the URL appeared without 'www', the URL would not be fixed.
114
- * Standards - Updated redirect method to use https or http as a an argument rather than true or false to better comply with WordPress coding standards.
115
- = 1.9 =
116
- * Created Updates widget on settings screen to allow for dynamic updates from the plugin developers.
117
- * Added support for PHP4.
118
- * Converted all spaces to tabs in source.
119
- * Force Shared SSL Admin option added to allow those using Shared SSL the ability to use their certificate for their admin dashboard.
120
- * Bug fix - Force SSL checkbox will now appear on WordPress versions below 2.9.
121
- * Bug fix - Password protected pages forced to SSL will now work properly.
122
- * Bug fix - Plugin should no longer break feeds.
123
- * Numerous other bug fixes that have since been forgotten due to the length of time this version has been in development.
124
- = 1.8.5 =
125
- * In version 1.8.5, when a page is forced to HTTPS, any links to that page will always be HTTPS, even when using the 'Disable Automatic HTTPS' option. Likewise, when the 'Force SSL Exclusively' option is enabled, all links to pages not forced to HTTPS will be changed to HTTP on HTTPS pages.
126
- * Updated RegEx's for more complicated URL's.
127
- * Bug fix - When in the admin panel, only link URL's are changed back to HTTP again.
128
- * Added support for using Shared SSL together with the FORCE_SSL_ADMIN and FORCE_SSL_LOGIN options.
129
- = 1.8.1 =
130
- * Re-enabled the canonical redirect for WordPres sites not using Shared SSL.
131
- = 1.8 =
132
- * Fixed cross-browser CSS issue on plugin settings page.
133
- * Corrected and updated plugin settings validation.
134
- * Lengthened the fade out timer on messages from the plugin settings page from 2 to 5 seconds so that the more lengthy error messages could be read before the message faded.
135
- * If viewing an admin page via SSL, and your Home URL is not set to HTTPS, links to the front-end of the website will be forced to HTTP. By default, WordPress changes these links to HTTPS.
136
- * When using Shared SSL, any anchor that links to the regular HTTPS version of the domain will be changed to use the Shared SSL Host.
137
- * Added embed and param tags to the list of tags that are fixed by WordPress HTTPS. This is to fix flash movies.
138
- = 1.7.5 =
139
- * Bug fix - When using 'Latest Posts' as the front page, the front page would redirect to HTTP when viewed over HTTPS even if the 'Force SSL Exclusively' option was disabled.
140
- * Prevented the 'Disable Automatic HTTPS' option from parsing URL's in the admin panel.
141
- * General code cleanup and such.
142
- = 1.7 =
143
- * Bug fix - External URL's were not being forced to HTTPS after the last update.
144
- * Added the functionality to correct relative URL's when using Shared SSL.
145
- * General code cleanup and such.
146
- = 1.6.5 =
147
- * Added support for Shared SSL.
148
- = 1.6.3 =
149
- * Changed the redirection check to use `template_redirect` hook rather than `get_header`.
150
- = 1.6.2 =
151
- * Tag links were not being set back to HTTP when the 'Disable Automatic HTTPS' option was enabled.
152
- = 1.6.1 =
153
- * Bug fix - front page redirection was causing issues when a static page was selected for the posts page.
154
- = 1.6 =
155
- * Added the ability to force the front page to HTTPS.
156
- * Multiple enhancements to core functionality of plugin. Mostly just changing code to integrate more smoothely with WordPress.
157
- * Enhancements have been made to the plugin's settings page.
158
- = 1.5.2 =
159
- * Fixed a bug that would prevent stylesheets from being fixed if the rel attribute came after the href attribute. Bug could have also caused errors with other tags.
160
- = 1.5.1 =
161
- * Added input elements with the type of 'image' to be filtered for insecure content.
162
- = 1.5 =
163
- * Added the ability to force SSL on certain pages.
164
- * Also added the option to exclusively force SSL on certain pages. Pages not forced to HTTPS are forced to HTTP.
165
- * Plugin now filters the `bloginfo` and `bloginfo_url` functions for HTTPS URL's when the 'Disable Automatic HTTPS' option is enabled in WordPress 3.0+.
166
- = 1.0.1 =
167
- * Bug fix.
168
- = 1.0 =
169
- * Major modifications to plugin structure, efficiency, and documentation.
170
- * Added the option to disable WordPress 3.0+ from changing all of your page, category and post links to HTTPS.
171
- = 0.5.1 =
172
- * Bug fix.
173
- = 0.5 =
174
- * Due to increasing concerns about plugin performance, the option to bypass the HTTPS check on external elements has been added.
175
- = 0.4 =
176
- * Plugin functions converted to OOP class.
177
- * The plugin will now attempt to set the allow_url_fopen option to true with `ini_set` function if possible.
178
- = 0.3 =
179
- * Added the option to change external elements to HTTPS if the external server allows the elements to be accessed via HTTPS.
180
- = 0.2 =
181
- * Changed the way in which HTTPS was detected to be more reliable.
182
- = 0.1 =
183
- * Initial Release.
184
-
185
- == Upgrade Notice ==
186
- = 1.7 =
187
- 1.6.5 created a bug in which external elements were no longer forced to HTTPS. Please update to fix this.
188
- = 1.6.1 =
189
- Version 1.6.1 fixes a bug with using a static page for the posts page.
190
- = 1.0.1 =
191
- Version 1.0.1 fixes a bug in 1.0 that made it to release. Apologies!
192
- = 1.0 =
193
- Version 1.0 gives you the ability to disable WordPress 3.0+ from changing all of your page, category and post links to HTTPS.
194
- = 0.5.1 =
195
- Fixes `PHP Warning: Invalid argument supplied for foreach()` error.
196
- = 0.3 =
197
- Version 0.3 gives you the option to change external elements to HTTPS if the external server allows the elements to be accessed via HTTPS.
198
- = 0.2 =
 
 
199
  Version 0.1 did not correctly detect HTTPS on IIS and possibly other servers. Please update to version 0.2 to fix this issue.
1
+ === WordPress HTTPS (SSL) ===
2
+ Contributors: Mvied
3
+ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=N9NFVADLVUR7A
4
+ Tags: security, encryption, ssl, shared ssl, private ssl, public ssl, private ssl, http, https
5
+ Requires at least: 2.7.0
6
+ Tested up to: 3.3
7
+
8
+ WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites.
9
+
10
+ == Description ==
11
+ <ul>
12
+ <li>Supports Shared and Private SSL.</li>
13
+ <li>Helps reduce or completely fix partially encrypted / mixed content errors.</li>
14
+ <li>Force SSL on a per-page basis.</li>
15
+ <li>Force SSL in admin panel.</li>
16
+ </ul>
17
+
18
+ If you're having partially encrypted/mixed content errors or other problems, please read the <a href="http://wordpress.org/extend/plugins/wordpress-https/faq/">FAQ</a>. If you're still having trouble, please <a href="http://wordpress.org/tags/wordpress-https#postform">start a support topic</a> and I will do my best to assist you.
19
+
20
+ = Known Issues =
21
+ When using a subdomain as the SSL Host, logged in cookies are not properly deleted upon logging out.
22
+
23
+ == Installation ==
24
+
25
+ 1. Upload the `wordpress-https` folder to the `/wp-content/plugins/` directory.
26
+ 1. Activate the plugin through the 'Plugins' menu in WordPress.
27
+
28
+ == Frequently Asked Questions ==
29
+
30
+ = How do I make my whole website secure? =
31
+
32
+ To make your entire website secure, you simply need to change your home url and site url to use HTTPS instead of HTTP. Please read <a href="http://codex.wordpress.org/Changing_The_Site_URL" target="_blank">how to change the site url</a>.
33
+
34
+ = How do I make only certain pages secure? =
35
+
36
+ In the Publish box on the add/edit post screen, a checkbox for 'Force SSL' has been added to make this process easy. See Screenshots if you're having a hard time finding it.
37
+
38
+ = I'm getting 404 errors on all of my pages. Why? =
39
+
40
+ If you're using a public/shared SSL, try disabling your custom permalink structure. Some public/shared SSL's have issues with WordPress' permalinks because of the way they are configured.
41
+
42
+ = How do I fix partially encrypted/mixed content errors? =
43
+
44
+ To identify what is causing your page(s) to be insecure, please follow the instructions below.
45
+ <ol>
46
+ <li>Download <a href="http://www.google.com/chrome" target="_blank">Google Chrome</a>.</li>
47
+ <li>Open the page you're having trouble with in Google Chrome.</li>
48
+ <li>Open the Developer Tools. <a href="http://code.google.com/chrome/devtools/docs/overview.html#access" target="_blank">How to access the Developer Tools.</a></li>
49
+ <li>Click on the Console tab.</li>
50
+ </ol>
51
+ For each item that is making your page partially encrypted, you should see an entry in the console similar to "The page at https://www.example.com/ displayed insecure content from http://www.example.com/." Note that the URL that is loading insecure content is HTTP and not HTTPS.
52
+
53
+ Most insecure content warnings can generally be resolved by changing absolute references to elements, or removing the insecure elements from the page completely. Although WordPress HTTPS does its best to fix all insecure content, there are a few cases that are impossible to fix.
54
+ <ul>
55
+ <li>Elements loaded via JavaScript that are hard-coded to HTTP. Usually this can be fixed by altering the JavaScript calling these elements.</li>
56
+ <li>External elements that can not be delivered over HTTPS. These elements will have to be removed from the page, or hosted locally so that they can be loaded over HTTPS.</li>
57
+ <li>YouTube videos - YouTube does not allow videos to be streamed over HTTPS. YouTube videos will have to be removed from secure pages.</li>
58
+ <li>Google Maps - Loading Google maps over HTTPS requires a Google Maps API Premiere account. (<a href="http://code.google.com/apis/maps/faq.html#ssl" target="_blank">source</a>)</li>
59
+ </ul>
60
+
61
+ = Is there a hook or filter to force pages to be secure? =
62
+
63
+ Yes! Here is an example of how to use the 'force_ssl' hook to force a page to be secure.
64
+ <code>
65
+ function custom_force_ssl( $force_ssl, $post_id ) {
66
+ if ( $post_id == 5 ) {
67
+ return true
68
+ }
69
+ return $force_ssl;
70
+ }
71
+
72
+ add_filter('force_ssl' , 'custom_force_ssl', 10, 2);
73
+ </code>
74
+
75
+ == Screenshots ==
76
+ 1. WordPress HTTPS Settings screen
77
+ 2. Force SSL checkbox added to add/edit posts screen
78
+
79
+ == Changelog ==
80
+
81
+ = 2.0.2 =
82
+ * Bug Fix - SSL Host option was not being saved correctly upon subsiquent saves. This was causing redirect loops for most users.
83
+ = 2.0.1 =
84
+ * Ensured that deprected options are removed from a WordPress installation when activating the plugin.
85
+ * Added a button to the WordPress HTTPS settings page to reset all plugin settings and cache.
86
+ * Bug Fix - URL's entered for SSL Host were not validing correctly.
87
+ * Bug Fix - External URL's were not always being identified as valid external elements.
88
+ * Bug Fix - Slight enhancement to SSL detection.
89
+ = 2.0 =
90
+ * Full support for using a custom SSL port has been added. A special thanks to <a href="http://chrisdoingweb.com/">Chris "doingweb" Antes</a> for his feedback and testing of this feature.
91
+ * Forcing pages to/from HTTPS is now pluggable using the 'force_ssl' filter.
92
+ * When using Force Shared SSL Admin, links to the admin panel will always be rewritten with the Shared SSL Host.
93
+ * When using Shared SSL, all links to post and pages from within the admin panel will use the Shared SSL Host to retain administration functionality on those pages.
94
+ * Redirects to the admin panel now hook into wp_redirect rather than using the auth_redirect pluggable function.
95
+ * Canonical redirects will now still occur on sites usinga different SSL Host, but not on secure pages.
96
+ * Cookies are now set with hooks rather than pluggable functions.
97
+ * Plugin will now delete all options and custom metadata when uninstalled.
98
+ * Added a HTTP_X_FORWARDED_PROTO check to the is_ssl function.
99
+ * Internal HTTPS Elements option has been removed. Disabling this option was never a good idea, so it was removed and the plugin will always act as it did when this option was enabled.
100
+ * External HTTPS Elements option has been removed. The handling of external elements has improved in such a way that this option is no longer required.
101
+ * Disable Automatic HTTPS option has been removed. This option should have generally been enabled anyway.
102
+ * Bug Fix - After logging in, the logged_in cookie was not being set properly. This caused the admin bar to not show up in both HTTP and HTTPS.
103
+ * Bug Fix - When using Shared SSL, the login page would not honor the redirect_to variable after a successful login.
104
+ = 1.9.2 =
105
+ * Added External URL caching to the plugin so that external elements will only be checked for once, increasing the speed of sites not using the Bypass External Check option.
106
+ * Any forms whose action points to page that has the Forced SSL option on will be updated to HTTPS even on HTTP pages.
107
+ * Bug Fix - When using Shared SSL, permalink structure was being buggy.
108
+ * Bug Fix - Certain server configurations were causing the plugin to create redirect loops when using the Force SSL Exclusively option.
109
+ = 1.9.1 =
110
+ * Bug Fix - Cookies were not being set to the correct paths when logging in, causing logins to fail.
111
+ * Bug Fix - Links to the front page when using latest posts were not correctly being set to HTTP/HTTPS.
112
+ * Bug Fix - When using Shared SSL, the HTTPS version of the site_url was not being correctly replaced with the Shared SSL URL for internal elements.
113
+ * Bug Fix - When using Shared SSL, the admin login page was not always redirecting properly due to output buffering.
114
+ * Bug Fix - When using Shared SSL, the auth_redirect function was not redirecting to the Shared SSL URL.
115
+ * Bug Fix - If the home_url contained 'www' but the URL appeared without 'www', the URL would not be fixed.
116
+ * Standards - Updated redirect method to use https or http as a an argument rather than true or false to better comply with WordPress coding standards.
117
+ = 1.9 =
118
+ * Created Updates widget on settings screen to allow for dynamic updates from the plugin developers.
119
+ * Added support for PHP4.
120
+ * Converted all spaces to tabs in source.
121
+ * Force Shared SSL Admin option added to allow those using Shared SSL the ability to use their certificate for their admin dashboard.
122
+ * Bug fix - Force SSL checkbox will now appear on WordPress versions below 2.9.
123
+ * Bug fix - Password protected pages forced to SSL will now work properly.
124
+ * Bug fix - Plugin should no longer break feeds.
125
+ * Numerous other bug fixes that have since been forgotten due to the length of time this version has been in development.
126
+ = 1.8.5 =
127
+ * In version 1.8.5, when a page is forced to HTTPS, any links to that page will always be HTTPS, even when using the 'Disable Automatic HTTPS' option. Likewise, when the 'Force SSL Exclusively' option is enabled, all links to pages not forced to HTTPS will be changed to HTTP on HTTPS pages.
128
+ * Updated RegEx's for more complicated URL's.
129
+ * Bug fix - When in the admin panel, only link URL's are changed back to HTTP again.
130
+ * Added support for using Shared SSL together with the FORCE_SSL_ADMIN and FORCE_SSL_LOGIN options.
131
+ = 1.8.1 =
132
+ * Re-enabled the canonical redirect for WordPres sites not using Shared SSL.
133
+ = 1.8 =
134
+ * Fixed cross-browser CSS issue on plugin settings page.
135
+ * Corrected and updated plugin settings validation.
136
+ * Lengthened the fade out timer on messages from the plugin settings page from 2 to 5 seconds so that the more lengthy error messages could be read before the message faded.
137
+ * If viewing an admin page via SSL, and your Home URL is not set to HTTPS, links to the front-end of the website will be forced to HTTP. By default, WordPress changes these links to HTTPS.
138
+ * When using Shared SSL, any anchor that links to the regular HTTPS version of the domain will be changed to use the Shared SSL Host.
139
+ * Added embed and param tags to the list of tags that are fixed by WordPress HTTPS. This is to fix flash movies.
140
+ = 1.7.5 =
141
+ * Bug fix - When using 'Latest Posts' as the front page, the front page would redirect to HTTP when viewed over HTTPS even if the 'Force SSL Exclusively' option was disabled.
142
+ * Prevented the 'Disable Automatic HTTPS' option from parsing URL's in the admin panel.
143
+ * General code cleanup and such.
144
+ = 1.7 =
145
+ * Bug fix - External URL's were not being forced to HTTPS after the last update.
146
+ * Added the functionality to correct relative URL's when using Shared SSL.
147
+ * General code cleanup and such.
148
+ = 1.6.5 =
149
+ * Added support for Shared SSL.
150
+ = 1.6.3 =
151
+ * Changed the redirection check to use `template_redirect` hook rather than `get_header`.
152
+ = 1.6.2 =
153
+ * Tag links were not being set back to HTTP when the 'Disable Automatic HTTPS' option was enabled.
154
+ = 1.6.1 =
155
+ * Bug fix - front page redirection was causing issues when a static page was selected for the posts page.
156
+ = 1.6 =
157
+ * Added the ability to force the front page to HTTPS.
158
+ * Multiple enhancements to core functionality of plugin. Mostly just changing code to integrate more smoothely with WordPress.
159
+ * Enhancements have been made to the plugin's settings page.
160
+ = 1.5.2 =
161
+ * Fixed a bug that would prevent stylesheets from being fixed if the rel attribute came after the href attribute. Bug could have also caused errors with other tags.
162
+ = 1.5.1 =
163
+ * Added input elements with the type of 'image' to be filtered for insecure content.
164
+ = 1.5 =
165
+ * Added the ability to force SSL on certain pages.
166
+ * Also added the option to exclusively force SSL on certain pages. Pages not forced to HTTPS are forced to HTTP.
167
+ * Plugin now filters the `bloginfo` and `bloginfo_url` functions for HTTPS URL's when the 'Disable Automatic HTTPS' option is enabled in WordPress 3.0+.
168
+ = 1.0.1 =
169
+ * Bug fix.
170
+ = 1.0 =
171
+ * Major modifications to plugin structure, efficiency, and documentation.
172
+ * Added the option to disable WordPress 3.0+ from changing all of your page, category and post links to HTTPS.
173
+ = 0.5.1 =
174
+ * Bug fix.
175
+ = 0.5 =
176
+ * Due to increasing concerns about plugin performance, the option to bypass the HTTPS check on external elements has been added.
177
+ = 0.4 =
178
+ * Plugin functions converted to OOP class.
179
+ * The plugin will now attempt to set the allow_url_fopen option to true with `ini_set` function if possible.
180
+ = 0.3 =
181
+ * Added the option to change external elements to HTTPS if the external server allows the elements to be accessed via HTTPS.
182
+ = 0.2 =
183
+ * Changed the way in which HTTPS was detected to be more reliable.
184
+ = 0.1 =
185
+ * Initial Release.
186
+
187
+ == Upgrade Notice ==
188
+ = 1.7 =
189
+ 1.6.5 created a bug in which external elements were no longer forced to HTTPS. Please update to fix this.
190
+ = 1.6.1 =
191
+ Version 1.6.1 fixes a bug with using a static page for the posts page.
192
+ = 1.0.1 =
193
+ Version 1.0.1 fixes a bug in 1.0 that made it to release. Apologies!
194
+ = 1.0 =
195
+ Version 1.0 gives you the ability to disable WordPress 3.0+ from changing all of your page, category and post links to HTTPS.
196
+ = 0.5.1 =
197
+ Fixes `PHP Warning: Invalid argument supplied for foreach()` error.
198
+ = 0.3 =
199
+ Version 0.3 gives you the option to change external elements to HTTPS if the external server allows the elements to be accessed via HTTPS.
200
+ = 0.2 =
201
  Version 0.1 did not correctly detect HTTPS on IIS and possibly other servers. Please update to version 0.2 to fix this issue.
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: 2.0.1
8
  Author URI: http://mvied.com/
9
  */
10
 
@@ -24,7 +24,7 @@ if ( !class_exists('WordPressHTTPS') ) {
24
  *
25
  * @var int
26
  */
27
- public $version = '2.0.1';
28
 
29
  /**
30
  * Debug Mode
@@ -363,7 +363,7 @@ if ( !class_exists('WordPressHTTPS') ) {
363
  $url = @$url[0][0];
364
  return $url;
365
  }
366
-
367
  /**
368
  * Retrieves the base host of a given URL
369
  *
@@ -1008,7 +1008,7 @@ if ( !class_exists('WordPressHTTPS') ) {
1008
  setcookie(LOGGED_IN_COOKIE, ' ', time() - 31536000, $cookie_path, $cookie_domain);
1009
  setcookie(LOGGED_IN_COOKIE, ' ', time() - 31536000, $cookie_path_site, $cookie_domain);
1010
  }
1011
-
1012
  $cookie_domain = parse_url($this->https_url, PHP_URL_HOST);
1013
  $cookie_path = rtrim(parse_url($this->https_url, PHP_URL_PATH), '/') . COOKIEPATH;
1014
  $cookie_path_site = rtrim(parse_url($this->https_url, PHP_URL_PATH), '/') . SITECOOKIEPATH;
@@ -1132,38 +1132,42 @@ if ( !class_exists('WordPressHTTPS') ) {
1132
  $_POST[$key] = 0;
1133
  update_option($key, $_POST[$key]);
1134
  } else {
1135
- if ( $key == 'wordpress-https_ssl_host' && $_POST[$key] != '' ) {
1136
- $url = $_POST[$key];
1137
- // Add scheme if it doesn't exist so that parse_url does not fail
1138
- if ( strpos($url, 'http://') === false && strpos($url, 'https://') === false ) {
1139
- $url = $this->replace_http('http://' . $url);
1140
- }
1141
- $url = parse_url($url);
1142
- $port = ((isset($_POST['wordpress-https_ssl_port'])) ? $_POST['wordpress-https_ssl_port'] : $url['port']);
1143
- $port = (($port != 80 && $port != 443) ? $port : null);
1144
- $url = 'https://' . $url['host'] . (($port) ? ':' . $port : '') . @$url['path'];
1145
-
1146
- // If secure host is set to a different host
1147
- if ( $url != $this->https_url ) {
1148
- $home_url = $url . parse_url(get_option('home'), PHP_URL_PATH);
1149
- // Add trailing slash
1150
- $home_url = ((substr($home_url, -1) !== '/') ? $home_url . '/' : $home_url);
1151
- // Ensure that the WordPress installation is accessible at this host
1152
- if ( $this->get_file_contents($home_url) ) {
1153
- // Remove trailing slash
1154
- if ( substr($url, -1, 1) == '/' ) {
1155
- $url = substr($url, 0, strlen($url)-1);
1156
- }
1157
- $this->log('[SETTINGS] Updated SSL Host: ' . $this->https_url . ' => ' . $url);
1158
-
1159
- // If secure domain has changed and currently on SSL, logout user
1160
- if ( $this->is_ssl() ) {
1161
- $logout = true;
 
 
 
 
 
 
1162
  }
1163
- $_POST[$key] = $this->remove_port($url);
1164
  } else {
1165
- $errors[] = '<strong>SSL Host</strong> - Invalid WordPress installation at ' . $home_url;
1166
- $_POST[$key] = get_option($key);
1167
  }
1168
  }
1169
  } else if ( $key == 'wordpress-https_ssl_admin' ) {
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: 2.0.2
8
  Author URI: http://mvied.com/
9
  */
10
 
24
  *
25
  * @var int
26
  */
27
+ public $version = '2.0.2';
28
 
29
  /**
30
  * Debug Mode
363
  $url = @$url[0][0];
364
  return $url;
365
  }
366
+
367
  /**
368
  * Retrieves the base host of a given URL
369
  *
1008
  setcookie(LOGGED_IN_COOKIE, ' ', time() - 31536000, $cookie_path, $cookie_domain);
1009
  setcookie(LOGGED_IN_COOKIE, ' ', time() - 31536000, $cookie_path_site, $cookie_domain);
1010
  }
1011
+
1012
  $cookie_domain = parse_url($this->https_url, PHP_URL_HOST);
1013
  $cookie_path = rtrim(parse_url($this->https_url, PHP_URL_PATH), '/') . COOKIEPATH;
1014
  $cookie_path_site = rtrim(parse_url($this->https_url, PHP_URL_PATH), '/') . SITECOOKIEPATH;
1132
  $_POST[$key] = 0;
1133
  update_option($key, $_POST[$key]);
1134
  } else {
1135
+ if ( $key == 'wordpress-https_ssl_host' ) {
1136
+ if ( $_POST[$key] != '' ) {
1137
+ $url = strtolower($_POST[$key]);
1138
+ // Add scheme if it doesn't exist so that parse_url does not fail
1139
+ if ( strpos($url, 'http://') === false && strpos($url, 'https://') === false ) {
1140
+ $url = $this->replace_http('http://' . $url);
1141
+ }
1142
+ $url = parse_url($url);
1143
+ $port = ((isset($_POST['wordpress-https_ssl_port'])) ? $_POST['wordpress-https_ssl_port'] : $url['port']);
1144
+ $port = (($port != 80 && $port != 443) ? $port : null);
1145
+ $url = 'https://' . $url['host'] . (($port) ? ':' . $port : '') . @$url['path'];
1146
+
1147
+ // If secure host is set to a different host
1148
+ if ( $url != $this->https_url ) {
1149
+ $home_url = $url . parse_url(get_option('home'), PHP_URL_PATH);
1150
+ // Add trailing slash
1151
+ $home_url = ((substr($home_url, -1) !== '/') ? $home_url . '/' : $home_url);
1152
+ // Ensure that the WordPress installation is accessible at this host
1153
+ if ( $this->get_file_contents($home_url) ) {
1154
+ // Remove trailing slash
1155
+ if ( substr($url, -1, 1) == '/' ) {
1156
+ $url = substr($url, 0, strlen($url)-1);
1157
+ }
1158
+ $this->log('[SETTINGS] Updated SSL Host: ' . $this->https_url . ' => ' . $url);
1159
+
1160
+ // If secure domain has changed and currently on SSL, logout user
1161
+ if ( $this->is_ssl() ) {
1162
+ $logout = true;
1163
+ }
1164
+ $_POST[$key] = $this->remove_port($url);
1165
+ } else {
1166
+ $errors[] = '<strong>SSL Host</strong> - Invalid WordPress installation at ' . $home_url;
1167
+ $_POST[$key] = get_option($key);
1168
  }
 
1169
  } else {
1170
+ $_POST[$key] = $this->https_url;
 
1171
  }
1172
  }
1173
  } else if ( $key == 'wordpress-https_ssl_admin' ) {