cvs: docweb /include init.inc.php

[email protected] ("Rasmus Lerdorf")
Newsgroups php.doc.web
Message-ID <cvsrasmus1171179813@cvsserver>
rasmus		Sun Feb 11 07:43:33 2007 UTC

  Modified files:              
    /docweb/include	init.inc.php 
  Log:
  Careful
  
  
http://cvs.php.net/viewvc.cgi/docweb/include/init.inc.php?r1=1.13&r2=1.14&diff_format=u
Index: docweb/include/init.inc.php
diff -u docweb/include/init.inc.php:1.13 docweb/include/init.inc.php:1.14
--- docweb/include/init.inc.php:1.13	Sun Feb  5 19:53:54 2006
+++ docweb/include/init.inc.php	Sun Feb 11 07:43:32 2007
@@ -18,7 +18,7 @@
 |                   Gabor Hojtsy <[email protected]>                        |
 |                   Sean Coates <[email protected]>                         |
 +----------------------------------------------------------------------+
-$Id: init.inc.php,v 1.13 2006/02/05 19:53:54 nlopess Exp $
+$Id: init.inc.php,v 1.14 2007/02/11 07:43:32 rasmus Exp $
 */
 
 error_reporting(E_ALL);
@@ -45,7 +45,7 @@
     // set up constants (use defaults if necessary)
     define('SITE',  isset($project)  ? $project  : $defaultProject);
     define('LANGC', isset($language) ? $language : $defaultLanguage);
-    define('URI',   isset($uri)      ? preg_replace('@^[/\.]+@', '/' ,$uri) : $_SERVER['REQUEST_URI']);
+    define('URI',   isset($uri)      ? preg_replace('@^[/\.]+@', '/' ,$uri) : htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES));
     define('LANGD', $LANGUAGES[LANGC]);
 
     if (isset($project)) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.