#31014 [NEW]: broken topic_id viewtopic redirect because of topic_id/post_id init

From: Date: Wed, 08 Dec 2004 02:14:17 +0000
Subject: #31014 [NEW]: broken topic_id viewtopic redirect because of topic_id/post_id init
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-69906@lists.php.net to get a copy of this message
From: shinigami at gmx dot net Operating system: WinXP PHP version: 4CVS-2004-12-08 (stable) PHP Bug Type: *URL Functions Bug description: broken topic_id viewtopic redirect because of topic_id/post_id init 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 bug report at http://bugs.php.net/?id=31014&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31014&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31014&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31014&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31014&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31014&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31014&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31014&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31014&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31014&r=support Expected behavior: http://bugs.php.net/fix.php?id=31014&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31014&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31014&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31014&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31014&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31014&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31014&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31014&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31014&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=31014&r=mysqlcfg

« previous php.bugs (#69906) next »