#33638 [Opn->Bgs]: /phpweb/include/site.inc -- revert revision 1.254

From: Date: Mon, 19 Sep 2005 12:10:40 +0000
Subject: #33638 [Opn->Bgs]: /phpweb/include/site.inc -- revert revision 1.254
References: 1  Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-29332@lists.php.net to get a copy of this message
ID: 33638 Updated by: sniper@php.net Reported By: rajesh at meetrajesh dot com -Status: Open +Status: Bogus Bug Type: Website problem Operating System: Linux PHP Version: Irrelevant New Comment: You're not hosting any official mirror, so no, this will not be reverted (it's a XSS hole!). Previous Comments: ------------------------------------------------------------------------ [2005-07-11 02:12:51] rajesh at meetrajesh dot com Description: ------------ $_SERVER['SERVER_NAME'] and $_SERVER['HTTP_HOST'] are NOT the same if the webpage is being served on a non-standard port. I rsync the PHP manual and run the manual on http://localhost:9000/. $_SERVER['SERVER_NAME'] redirects the page back to http://localhost/ and all images are called from http://localhost instead of http://localhost:9000/ due to the use of $_SERVER['SERVER_NAME']. Using $_SERVER['HTTP_HOST'] corrects this problem. Reproduce code: --------------- Line 188 in /phpweb/includes/site.inc: - $MYSITE = 'http://' . preg_replace("!^www\\.!", "", $_SERVER["SERVER_NAME"]) . '/'; + $MYSITE = 'http://' . preg_replace("!^www\\.!", "", $_SERVER["HTTP_HOST"]) . '/'; ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33638&edit=1

« previous php.mirrors (#29332) next »