push forward server validation from 4.1 branch
authorxzilla <xzilla>
Thu, 19 Jul 2007 03:11:52 +0000 (03:11 +0000)
committerxzilla <xzilla>
Thu, 19 Jul 2007 03:11:52 +0000 (03:11 +0000)
classes/Misc.php
lang/english.php
lang/french.php
lang/italian.php
lang/recoded/english.php
lang/recoded/french.php
lang/recoded/italian.php
lang/recoded/spanish.php
lang/spanish.php

index db7b9668f7cec5257ca282b2cb3b273c9944c582..8c04da37a7c14c2f23531251ba229ad75917030d 100644 (file)
@@ -2,7 +2,7 @@
        /**
         * Class to hold various commonly used functions
         *
-        * $Id: Misc.php,v 1.156 2007/07/17 17:09:29 soranzo Exp $
+        * $Id: Misc.php,v 1.157 2007/07/19 03:11:52 xzilla Exp $
         */
         
        class Misc {
                }
                
                /**
-                * Get information on a server.
+                * Validate and retrieve information on a server.
                 * If the parameter isn't supplied then the currently
                 * connected server is returned.
                 * @param $server_id A server identifier (host:port)
                 * @return An associative array of server properties
                 */
                function getServerInfo($server_id = null) {
-                       global $conf, $_reload_browser;
+                       global $conf, $_reload_browser, $lang;
 
                        if ($server_id === null && isset($_REQUEST['server']))
                                $server_id = $_REQUEST['server'];
                                        return $info;
                                }
                        }
-                       
-                       return null;
+
+                       if ($server_id === null){
+                               return null;
+                       } else {
+                               // Unable to find a matching server, are we being hacked? 
+                               echo $lang['strinvalidserverparam'];
+                               exit;
+                       }       
                }
                
                /**
index 94d85390b4931dbf40788f973e3f878c073a537f..2f92f82ea29d952f537c79d81e04b406fffb24ec 100755 (executable)
@@ -4,7 +4,7 @@
         * English language file for phpPgAdmin.  Use this as a basis
         * for new translations.
         *
-        * $Id: english.php,v 1.212 2007/07/18 21:19:09 xzilla Exp $
+        * $Id: english.php,v 1.213 2007/07/19 03:11:52 xzilla Exp $
         */
 
        // Language and character set
        $lang['strimporterrorline-badcolumnnum'] = 'Import error on line %s: Line does not possess the correct number of columns.';
        $lang['strimporterror-uploadedfile'] = 'Import error: File could not be uploaded to the server';
        $lang['strcannotdumponwindows'] = 'Dumping of complex table and schema names on Windows is not supported.';
+       $lang['strinvalidserverparam'] = 'Attempt to connect with invalid server parameter, possibly someone is trying to hack your system.'; 
        $lang['strnoserversupplied'] = 'No server supplied!';
 
        // Tables
index 2d0fc6f610513a6741884d098c8c3289e3a26b8c..b195f80f9e37945ff802d563ae56f26e426077e2 100644 (file)
@@ -4,7 +4,7 @@
      * French Language file for phpPgAdmin. 
      * @maintainer Pascal PEYRE [pascal.peyre@cir.fr]
      *
-     * $Id: french.php,v 1.26 2007/07/18 22:33:19 ioguix Exp $
+     * $Id: french.php,v 1.27 2007/07/19 03:11:52 xzilla Exp $
      */
 
     // Language and character set
     $lang['strimporterrorline-badcolumnnum']  =  'Erreur d\'importation sur la ligne %s : la ligne ne possède pas le bon nombre de colonnes.';
     $lang['strimporterror-uploadedfile']  =  'Erreur d\'importation : le fichier n\'a pas pû être récupéré sur le serveur.';
     $lang['strcannotdumponwindows']  =  'La sauvegarde de table complexe et des noms de schémas n\'est pas supporté sur Windows.';
+       $lang['strinvalidserverparam'] = 'Tentative de connexion avec un serveur invalide, il est possible que quelqu\'un essai de pirater votre système.'; 
        $lang['strnoserversupplied']  =  'Aucun serveur fournis !';
 
     // Tables
index eca966eca4a4c3459a07d0c67c60118566fb85be..273fbb4125a3fd3597133434170a1b6014cf5bfa 100644 (file)
@@ -4,7 +4,7 @@
         * Italian language file, based on the english language file for phpPgAdmin.
         * Nicola Soranzo [nsoranzo@tiscali.it]
         *
-        * $Id: italian.php,v 1.45 2007/05/14 16:09:52 soranzo Exp $
+        * $Id: italian.php,v 1.46 2007/07/19 03:11:52 xzilla Exp $
         */
 
        // Language and character set - Lingua e set di caratteri
        $lang['strimporterrorline-badcolumnnum'] = 'Errore durante l\'import alla linea %s: la linea non possiede il numero corretto di colonne.';
        $lang['strimporterror-uploadedfile'] = 'Errore durante l\'import: non è stato possibile caricare il file sul server';
        $lang['strcannotdumponwindows'] = 'Il dump di nomi complessi di tabelle o schemi sotto Windows non è supportato.';
+       $lang['strinvalidserverparam'] = 'Tentativo di connessione al server con parametri non validi, è possibile che qualcuno stia cercando di forzare il sistema.';
 
        // Tables - Tabelle
        $lang['strtable'] = 'Tabella';
index 721e90bc6bd834276374c8626dac9b20e31db2ab..970313cac3739a297431bcbe952033708ddc0907 100644 (file)
@@ -4,7 +4,7 @@
         * English language file for phpPgAdmin.  Use this as a basis
         * for new translations.
         *
-        * $Id: english.php,v 1.164 2007/07/18 21:19:09 xzilla Exp $
+        * $Id: english.php,v 1.165 2007/07/19 03:11:52 xzilla Exp $
         */
 
        // Language and character set
        $lang['strimporterrorline-badcolumnnum'] = 'Import error on line %s: Line does not possess the correct number of columns.';
        $lang['strimporterror-uploadedfile'] = 'Import error: File could not be uploaded to the server';
        $lang['strcannotdumponwindows'] = 'Dumping of complex table and schema names on Windows is not supported.';
+       $lang['strinvalidserverparam'] = 'Attempt to connect with invalid server parameter, possibly someone is trying to hack your system.'; 
        $lang['strnoserversupplied'] = 'No server supplied!';
 
        // Tables
index 5d3f5a2cf0a70fd0257c35109f811163ae078f50..af0c16f68962faeda25b1c36c46a960d979ecc7b 100644 (file)
@@ -4,7 +4,7 @@
      * French Language file for phpPgAdmin. 
      * @maintainer Pascal PEYRE [pascal.peyre@cir.fr]
      *
-     * $Id: french.php,v 1.25 2007/07/18 22:33:19 ioguix Exp $
+     * $Id: french.php,v 1.26 2007/07/19 03:11:52 xzilla Exp $
      */
 
     // Language and character set
     $lang['strimporterrorline-badcolumnnum']  =  'Erreur d\'importation sur la ligne %s : la ligne ne poss&#232;de pas le bon nombre de colonnes.';
     $lang['strimporterror-uploadedfile']  =  'Erreur d\'importation : le fichier n\'a pas p&#251; &#234;tre r&#233;cup&#233;r&#233; sur le serveur.';
     $lang['strcannotdumponwindows']  =  'La sauvegarde de table complexe et des noms de sch&#233;mas n\'est pas support&#233; sur Windows.';
+       $lang['strinvalidserverparam'] = 'Tentative de connexion avec un serveur invalide, il est possible que quelqu\'un essai de pirater votre syst&#232;me.'; 
        $lang['strnoserversupplied']  =  'Aucun serveur fournis !';
 
     // Tables
index f1d2d5cc0d7d60c8bfbbed2c4127c86cae068f0c..13f19c190957e5adbc3752a88bfd97509922e13e 100644 (file)
@@ -4,7 +4,7 @@
         * Italian language file, based on the english language file for phpPgAdmin.
         * Nicola Soranzo [nsoranzo@tiscali.it]
         *
-        * $Id: italian.php,v 1.41 2007/05/14 16:09:52 soranzo Exp $
+        * $Id: italian.php,v 1.42 2007/07/19 03:11:52 xzilla Exp $
         */
 
        // Language and character set - Lingua e set di caratteri
        $lang['strimporterrorline-badcolumnnum'] = 'Errore durante l\'import alla linea %s: la linea non possiede il numero corretto di colonne.';
        $lang['strimporterror-uploadedfile'] = 'Errore durante l\'import: non &#232; stato possibile caricare il file sul server';
        $lang['strcannotdumponwindows'] = 'Il dump di nomi complessi di tabelle o schemi sotto Windows non &#232; supportato.';
+       $lang['strinvalidserverparam'] = 'Tentativo di connessione al server con parametri non validi, &#232; possibile che qualcuno stia cercando di forzare il sistema.';
 
        // Tables - Tabelle
        $lang['strtable'] = 'Tabella';
index a7d6b9b26758c8a7e441fb48942e72ddc170feb2..ff13761a34d5f1f57a6aec64c620edd6bbae59de 100644 (file)
@@ -4,7 +4,7 @@
         * Spanish language file for phpPgAdmin.
         * @maintainer Mart&#237;n Marqu&#233;s (martin@bugs.unl.edu.ar)
         *
-        * $Id: spanish.php,v 1.38 2007/04/24 11:43:16 soranzo Exp $
+        * $Id: spanish.php,v 1.39 2007/07/19 03:11:52 xzilla Exp $
         */
 
        // Language and character set
@@ -168,6 +168,7 @@ $lang['strac']  =  'Enable AutoComplete';
     $lang['strimporterrorline-badcolumnnum']  =  'Error de importaci&#243;n en la l&#237;nea %s:  La l&#237;nea no posee la cantidad de columnas correctas.';
     $lang['strimporterror-uploadedfile']  =  'Error de importaci&#243;n: No se ha podido subir el archivo al servidor';
     $lang['strcannotdumponwindows']  =  'Vuelco de datos con nombres complejos de tablas y esquemas no esta soportado en Windows.';
+       $lang['strinvalidserverparam'] = 'Tentativa de conectar con par&#225;metro inv&#225;lido del servidor. &#191;Alguien est&#225; intentando posiblemente cortar tu sistema?'; 
 
        // Tables
        $lang['strtable'] = 'Tabla';
@@ -267,8 +268,8 @@ $lang['strac']  =  'Enable AutoComplete';
        $lang['strgroupcreatedbad'] = 'Fall&#243; la creaci&#243;n del grupo.';
        $lang['strconfdropgroup'] = '&#191;Est&#225; seguro que quiere eliminar el grupo &quot;%s&quot;?';
        $lang['strgroupdropped'] = 'Grupo eliminado.';
-    $lang['strgroupdroppedbad'] = 'Fall&#243; la eliminaci&#243;n del grupo.';
-    $lang['strmembers'] = 'Miembros';
+        $lang['strgroupdroppedbad'] = 'Fall&#243; la eliminaci&#243;n del grupo.';
+        $lang['strmembers'] = 'Miembros';
        $lang['strmemberof']  =  'Miembro de';
        $lang['stradminmembers']  =  'Miembros Admin ';
        $lang['straddmember'] = 'Agregar un miembro';
@@ -279,31 +280,35 @@ $lang['strac']  =  'Enable AutoComplete';
        $lang['strmemberdropped'] = 'Miembro eliminado.';
        $lang['strmemberdroppedbad'] = 'Fall&#243; al intentar sacar un miembro.';
 
-       // Roles
-       $lang['strrole']  =  'Rol';
-       $lang['strroles']  =  'Roles';
-       $lang['strrolename']  =  'Nombre del Rol';
-       $lang['strshowallroles'] = 'Mostrar todas los rols';
+    // Roles
+    $lang['strrole']  =  'Rol';
+    $lang['strroles']  =  'Roles';
+    $lang['strrolename']  =  'Nombre del Rol';
+    $lang['strshowallroles'] = 'Mostrar todas los rols';
     $lang['strinheritsprivs']  =  'Hereda Privilegios?';
-       $lang['strcreaterole']  =  'Crear Rol';
-       $lang['strcancreaterole']  =  'Puede crear rols?';
-       $lang['strrolecreated']  =  'Rol creado.';
-       $lang['strrolecreatedbad']  =  'Fall&#243; al crear rol.';
-       $lang['stralterrole']  =  'Alterar role';
-$lang['strroleupdated']  =  'Role updated.';
-$lang['strroleupdatedbad']  =  'Role update failed.';
-$lang['strcatupdate']  =  'Modify Catalogs?';
+    $lang['strcreaterole']  =  'Crear Rol';
+    $lang['strcancreaterole']  =  'Puede crear rols?';
+    $lang['strrolecreated']  =  'Rol creado.';
+    $lang['strrolecreatedbad']  =  'Fall&#243; al crear rol.';
+    $lang['stralterrole']  =  'Alterar role';
+    $lang['strroleupdated']  =  'Rol actualizado.';
+    $lang['strroleupdatedbad']  = 'Fall&#243; la actualizaci&#243;n del rol.';
+    $lang['struserupdatedbad'] = 
+    $lang['strcatupdate']  =  '&#191;modificar los cat&#225;logos del sistema?';
     $lang['strcanlogin']  =  'Puede loggearse?';
-$lang['strconnlimit']  =  'Connection limit';
-$lang['strdroprole']  =  'Drop role';
-    $lang['strmaxconnections']  =  'M&#225;ximo de conexiones';
+    $lang['strconnlimit']  =  'L&#237;mite de conexi&#243;n';
+    $lang['strdroprole']  =  'Eliminar rol';
+    $lang['strmaxconnections']  =  'M&#225;ximo de conexi&#243;nes';
        $lang['strconfdroprole']  =  '&#191;Est&#225; seguro de que desea eliminar el rol &quot;%s&quot;?';
     $lang['strroledropped']  =  'Usuario eliminado.';
        $lang['strroledroppedbad']  =  'No puedo eliminar rol.';
        $lang['strnoroles']  =  'No se encontraron los rols.';
        $lang['strnolimit']  =  'Sin l&#237;mite';
        $lang['strnever']  =  'Nunca';
-$lang['strroleneedsname']  =  'You must give a name for the role.';
+    $lang['strroleneedsname']  =  'Debe darlo un nombre al rol.';
+    $lang['strrolealtered'] = 'Rol alterada.';
+    $lang['strrolealteredbad'] = 'Fall&#243; al intentar alterar rol.';
+
        
        // Privileges
        $lang['strprivilege'] = 'Privilegio';
@@ -342,11 +347,11 @@ $lang['strroleneedsname']  =  'You must give a name for the role.';
        $lang['strfull'] = 'Full';
        $lang['strfreeze'] = 'Freeze';
        $lang['strforce'] = 'Force';
-    $lang['strsignalsent']  =  'Se&#241;al enviada.';
-    $lang['strsignalsentbad']  =  'Fall&#243; el env&#237;o de la se&#241;al.';
-    $lang['strallobjects']  =  'Todos los objetos';
-    $lang['strdatabasealtered']  =  'Base de Datos alterada.';
-    $lang['strdatabasealteredbad']  =  'Fall&#243; al intentar alterar la Base de Datos.';
+        $lang['strsignalsent']  =  'Se&#241;al enviada.';
+        $lang['strsignalsentbad']  =  'Fall&#243; el env&#237;o de la se&#241;al.';
+        $lang['strallobjects']  =  'Todos los objetos';
+        $lang['strdatabasealtered']  =  'Base de Datos alterada.';
+        $lang['strdatabasealteredbad']  =  'Fall&#243; al intentar alterar la Base de Datos.';
 
        // Views
        $lang['strview'] = 'Vista';
index 12287ba87a41606700a94f084366056d78910bb0..8dff1e4c98015a7588bfa2952fba57ead13fa027 100644 (file)
@@ -4,7 +4,7 @@
         * Spanish language file for phpPgAdmin.
         * @maintainer Martín Marqués (martin@bugs.unl.edu.ar)
         *
-        * $Id: spanish.php,v 1.38 2007/04/24 11:42:07 soranzo Exp $
+        * $Id: spanish.php,v 1.39 2007/07/19 03:11:52 xzilla Exp $
         */
 
        // Language and character set
@@ -168,6 +168,7 @@ $lang['strac']  =  'Enable AutoComplete';
     $lang['strimporterrorline-badcolumnnum']  =  'Error de importación en la línea %s:  La línea no posee la cantidad de columnas correctas.';
     $lang['strimporterror-uploadedfile']  =  'Error de importación: No se ha podido subir el archivo al servidor';
     $lang['strcannotdumponwindows']  =  'Vuelco de datos con nombres complejos de tablas y esquemas no esta soportado en Windows.';
+       $lang['strinvalidserverparam'] = 'Tentativa de conectar con parámetro inválido del servidor. ¿Alguien está intentando posiblemente cortar tu sistema?'; 
 
        // Tables
        $lang['strtable'] = 'Tabla';