|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31014 broken topic_id viewtopic redirect because of topic_id/post_id init
Submitted: 2004-12-08 03:14 UTC Modified: 2004-12-08 06:54 UTC
From: shinigami at gmx dot net Assigned:
Status: Not a bug Package: *URL Functions
PHP Version: 4CVS-2004-12-08 (stable) OS: WinXP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: shinigami at gmx dot net
New email:
PHP Version: OS:


 [2004-12-08 03:14 UTC] shinigami at gmx dot net

in phpBB 2.0.5 someone has added "$topic_id = $post_id = 0;" into viewtopic.php (line ~32) which will destruct this part of code (line ~182)

  if ( !$userdata['session_logged_in'] )
    $redirect = ( isset($post_id) ) ? POST_POST_URL . "=$post_id" : POST_TOPIC_URL . "=$topic_id";
    $redirect .= ( isset($start) ) ? "&start=$start" : '';
    redirect(append_sid("login.$phpEx?redirect=viewtopic.$phpEx&$redirect", true));

because "isset($post_id)" will choose "post_id" in any case even if you call "http://xyz/forum/viewtopic.php?t=123".

i'm using 2.0.10 but patch file to 2.0.11 doesn't remove the additional line, so, this error should be still present.



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-08 06:54 UTC]
This is totally wrong place to report phpBB bugs. 
Try here instead:

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Mar 04 16:01:29 2024 UTC