Skip to content

Commit

Permalink
Fixed bug where URL parameters were being stripped on redirects. Upda…
Browse files Browse the repository at this point in the history
…ted to version 3.1.2.
  • Loading branch information
Mike Ems committed Jul 11, 2012
1 parent f873bec commit 5d078f8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions lib/WordPressHTTPS.php
Expand Up @@ -339,6 +339,10 @@ public function redirect( $scheme = 'https' ) {

if ( $url ) {
$path = ( isset($_SERVER['REDIRECT_URL']) ? $_SERVER['REDIRECT_URL'] : $_SERVER['REQUEST_URI'] );
if ( strpos($_SERVER['REQUEST_URI'], '?') !== false && isset($_SERVER['REDIRECT_URL']) && strpos($_SERVER['REDIRECT_URL'], '?') === false ) {
$path .= substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], '?'));
}

if ( $this->getHttpsUrl()->getPath() != '/' ) {
$path = str_replace($this->getHttpsUrl()->getPath(), '', $path);
}
Expand Down
3 changes: 3 additions & 0 deletions readme.txt
Expand Up @@ -76,6 +76,9 @@ add_filter('force_ssl', 'store_force_ssl', 10, 3);`
* SSL Domain Mapping

== Changelog ==
= 3.1.2 =
* Bug Fix - Redirects were removing URL parameters.
* Bug Fix - Removed loginout filter that was changing links to plain text.
= 3.1.1 =
* Bug Fix - Fixed bug in Parser.
= 3.1 =
Expand Down
4 changes: 2 additions & 2 deletions wordpress-https.php
Expand Up @@ -4,7 +4,7 @@
Plugin URI: http://mvied.com/projects/wordpress-https/
Description: WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites.
Author: Mike Ems
Version: 3.1.1
Version: 3.1.2
Author URI: http://mvied.com/
*/

Expand Down Expand Up @@ -48,7 +48,7 @@ function wphttps_autoloader($class) {
if ( function_exists('get_bloginfo') && ! defined('WP_UNINSTALL_PLUGIN') ) {
$wordpress_https = new WordPressHTTPS;
$wordpress_https->setSlug('wordpress-https');
$wordpress_https->setVersion('3.1.1');
$wordpress_https->setVersion('3.1.2');
$wordpress_https->setLogger(WordPressHTTPS_Logger::getInstance());
$wordpress_https->setPluginUrl(plugins_url('', __FILE__));
$wordpress_https->setDirectory(dirname(__FILE__));
Expand Down

0 comments on commit 5d078f8

Please sign in to comment.