#31014 [Opn->Bgs]: broken topic_id viewtopic redirect because of topic_id/post_id init

From: Date: Wed, 08 Dec 2004 05:54:26 +0000
Subject: #31014 [Opn->Bgs]: broken topic_id viewtopic redirect because of topic_id/post_id init
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-69910@lists.php.net to get a copy of this message
ID: 31014 Updated by: sniper@php.net Reported By: shinigami at gmx dot net -Status: Open +Status: Bogus Bug Type: *URL Functions Operating System: WinXP PHP Version: 4CVS-2004-12-08 (stable) New Comment: This is totally wrong place to report phpBB bugs. Try here instead: http://www.phpbb.com/bugs Previous Comments: ------------------------------------------------------------------------ [2004-12-08 03:14:14] shinigami at gmx dot net Description: ------------ hi, 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. Shinigami ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31014&edit=1

« previous php.bugs (#69910) next »