Issue #22 new

SMF login is not redirecting back to wordpress

Anonymous created an issue

I had this issue that after logging in SMF I remained in SMF. After checking, the problem was that the wp_redirect string contained a "+" that was converted to a " " (space). Thus, the function decodeRedirect returned FALSE.

I made a fix for me with this patch:

--- WordpressBridge.php.orig 2011-09-12 18:57:04.000000000 +0200 +++ WordpressBridge.php 2011-09-12 18:57:38.000000000 +0200 @@ -987,6 +987,7 @@ }

 private function decodeRedirect($string) {
  • $string = str_replace(" ","+",$string); $string = base64_decode($string);

     if (function_exists('gzinflate'))
    

Comments (3)

  1. Anonymous
    --- WordpressBridge.php.orig    2011-09-12 18:57:04.000000000 +0200
    +++ WordpressBridge.php 2011-09-12 18:57:38.000000000 +0200
    @@ -987,6 +987,7 @@
         }
     
         private function decodeRedirect($string) {
    +        $string = str_replace(" ","+",$string);
             $string = base64_decode($string);
     
             if (function_exists('gzinflate'))
    
  2. aashian

    thanks. but it didnt work for me. i'm not sure this is what i'm looking for. when i go to wordpress to register, it redirects me to SMF registration. after registration, i'm registered at SMF but it looks like i'm not at WP. i want my users to be able to do blog posts and comments (logged into WP). i'm not sure if this patch will fix it.

    am i supposed to replace exactly this?

         }      private function decodeRedirect($string) {+        $string = str_replace(" ","+",$string);         $string = base64_decode($string);          if (function_exists('gzinflate'))
    
    
    

    in the file there is still another line below that that was omitted. was that on purpose? is it supposed to be left out? this line -

    $string = gzinflate($string);

    and how did you edit the wordpressbridge.php? can it be edited in the SMF admin? i edited it on my computer then zipped all the files back up and reinstalled the mod. i just want to know if there is an easier way.

    sorry i'm a newbie at this. i dont know coding at all. thanks.

  3. Log in to comment