Title: [Plugin: Mozilla BrowserID] [Plugin: BrowserID] Redirect Bug?
Last modified: August 20, 2016

---

# [Plugin: Mozilla BrowserID] [Plugin: BrowserID] Redirect Bug?

 *  Resolved [marv51](https://wordpress.org/support/users/marv51/)
 * (@marv51)
 * [14 years ago](https://wordpress.org/support/topic/plugin-mozilla-browserid-plugin-browserid-redirect-bug/)
 * Hi Marcel,
 * I think I found a bug in the way the plugin redirects. When I go to domain.com/
   wp-admin/
    I get redirected to [http://domain.com/wp-login.php?redirect_to=http%3A%2F%2Fdomain.com%2Fwp-admin%2F&reauth=1](http://domain.com/wp-login.php?redirect_to=http%3A%2F%2Fdomain.com%2Fwp-admin%2F&reauth=1)
   Now after I signed I with BrowserID I would get redirected to [http://domain.com/%2Fwp-admin%2F](http://domain.com/%2Fwp-admin%2F)
   or [http://domain.com/http%3A%2F%2Fdomain.com%2Fwp-admin%2F](http://domain.com/http%3A%2F%2Fdomain.com%2Fwp-admin%2F)
   both ways get 404-errors.
 * The bug seems to be fixed by adding urldecode() to the redirect_to.
    In Handle_login():
   $redirect_to = urldecode($_REQUEST[‘redirect_to’]);
 * But, I’m not sure this is a good fix, because the PHP manual says to not call
   it on $_REQUEST.([http://php.net/manual/en/function.urldecode.php](http://php.net/manual/en/function.urldecode.php))
 * Kind regards,
 * Marvin
 * [http://wordpress.org/extend/plugins/browserid/](http://wordpress.org/extend/plugins/browserid/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [marv51](https://wordpress.org/support/users/marv51/)
 * (@marv51)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-mozilla-browserid-plugin-browserid-redirect-bug/#post-2778384)
 * I’m not sure what is going on here, this is very confusing. But this hasn’t occurred
   with the latest development version.
    So resolved.
 *  [JohnRDOrazio](https://wordpress.org/support/users/lwangaman/)
 * (@lwangaman)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/plugin-mozilla-browserid-plugin-browserid-redirect-bug/#post-2778451)
 * I think I found the problem, because redirect always goes to wp-admin even if
   I set it in the options to the homepage.
    In the function “**Handle_login()**“,
   I tried:
 *     ```
       $string = var_export($options);
       die($string);
       ```
   
 * to see the value of **$options**, and it was NULL !
    I think you forgot to call:`
   $options = get_option('browserid_options');` at the beginning of the function“**
   Handle_login()**“, as you do in other functions. In fact, adding that line, as
   so:
 *     ```
       function Handle_login($result, $rememberme) {
         $options = get_option('browserid_options');
       ```
   
 * fixed everything for me. Now $options is a valid array, and the redirect works
   perfectly.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: Mozilla BrowserID] [Plugin: BrowserID] Redirect Bug?’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/browserid.svg)
 * [Mozilla Persona (BrowserID)](https://wordpress.org/plugins/browserid/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/browserid/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/browserid/)
 * [Active Topics](https://wordpress.org/support/plugin/browserid/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/browserid/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/browserid/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [JohnRDOrazio](https://wordpress.org/support/users/lwangaman/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/plugin-mozilla-browserid-plugin-browserid-redirect-bug/#post-2778451)
 * Status: resolved