HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Redirect loop when changing locales

This discussion is related to the Multilingual addon.
R_JR_J Ex-FanboyMunich Admin

I seem to have changed my locale setting here by accident. When trying to set it back, I got a "The page isn't redirecting properly" error.

Based on the code of the plugin, I would say it tries to redirect the user to the HTTP_REFERER

        $successRedirect = $_SERVER['HTTP_REFERER'];
        $target = gdn::request()->get('Target');
        if ($target) {
           $successRedirect = $target;
        }
        // Back from whence we came.
        safeRedirect($successRedirect);

But looking at the request, the REFERER is "https://vanillaforums.org/profile/setlocale/en/MyTransientKey" and that's why the request loops endlessly.

Comments

  • should use Target not HTTP_REFERER which can be set to anything.

    grep is your friend.

Sign In or Register to comment.