1

Topic: Reply redirect issue

After updating using hdiff from 1.2.14 to 1.2.17, I noticed that after posting a new topic or reply that it no longer redirects to that topic. Instead, it redirects back to the index of the forums.

I noticed that it to redirect it checks the $new_pid so that it can redirect to that post. I also remember changing some lines that had to do with the $new_pid variable. I'm betting that is the reason for the bug.

Is anyone else having this problem?

-ag

Re: Reply redirect issue

I would check your files against a fresh version of 1.2.17's post.php and see if you notice where the update was done incorrectly.

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

3

Re: Reply redirect issue

hmm never checked back for a while.

Actually, it is a problem with the redirect function. I changed it back and it worked fine.

Changing this caused it to always redirect to the index:

// Prefix with o_base_url (unless there's already a valid URI)
    $destination_url = 'index.php';
    if (strpos($destination_url, 'http://') !== 0 && strpos($destination_url, 'https://') !== 0 && strpos($destination_url, '/') !== 0)
        $destination_url = $pun_config['o_base_url'].'/'.$destination_url;

    // Do a little spring cleaning
    $destination_url = preg_replace('/([\r\n])|(%0[ad])|(;[\s]*data[\s]*:)/i', '', $destination_url);

Is there a problem with it? Or do i need to change something else for it to work?

for now im going to keep my original code.

Re: Reply redirect issue

The code was changed for security reasons. If you're having issues with it, post.php's redirect was modified incorrectly. I suggest you fix the underlying issue rather than removing code that protects you. wink

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

5

Re: Reply redirect issue

Well, i forgot to mention that this happens with everything. post.php, the administration, logging in, profile, etc. And post.php is probably modified correctly, ty.

Do you know why this would happen? hmm I see that it has "$destination_url = 'index.php';", which is where it redirects. I would like it to be secure, but I also want it to work...

Re: Reply redirect issue

Oh. I don't know where the $destination_url = 'index.php'; line came from, just remove that.

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize