move xss prevention to end of lib.inc.php in case we override $lang[appcharset]
authorxzilla <xzilla>
Thu, 31 May 2007 21:13:24 +0000 (21:13 +0000)
committerxzilla <xzilla>
Thu, 31 May 2007 21:13:24 +0000 (21:13 +0000)
libraries/lib.inc.php

index 18683a21ba58ae5a45659b2351e880b65f2fbc53..c20a97b7949d3e7123d3a9fd1204ada3d4088a7b 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Function library read in upon startup
         *
-        * $Id: lib.inc.php,v 1.116 2007/05/31 15:54:18 xzilla Exp $
+        * $Id: lib.inc.php,v 1.117 2007/05/31 21:13:24 xzilla Exp $
         */
 
        include_once('./libraries/decorator.inc.php');
                $_SESSION['webdbLanguage'] = $_language;
        }
 
-       // Prevent XSS attacks
-       $PHP_SELF = htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, $lang['appcharset']);
-
        // Check for config file version mismatch
        if (!isset($conf['version']) || $conf['base_version'] > $conf['version']) {
                echo $lang['strbadconfig'];
                        else
                                $lang['appcharset'] = $dbEncoding;
                }
+       
                
                // Load Slony if required               
                if ($_server_info['slony_support']) {
                }
        }
 
+    // Prevent XSS attacks
+    $PHP_SELF = htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, $lang['appcharset']);
+
 ?>