fix #1482098 Logout /Security/ Issue
authorioguix <ioguix>
Mon, 18 Feb 2008 22:20:26 +0000 (22:20 +0000)
committerioguix <ioguix>
Mon, 18 Feb 2008 22:20:26 +0000 (22:20 +0000)
classes/Misc.php
lang/english.php
lang/french.php
lang/recoded/english.php
lang/recoded/french.php
servers.php

index 5011c53e8e1cfbf42f8d5673e14f71f2768d6e39..b6eebf31d8c7698b5b5dc556af9eca575867dac3 100644 (file)
@@ -2,7 +2,7 @@
        /**
         * Class to hold various commonly used functions
         *
-        * $Id: Misc.php,v 1.169 2008/02/13 23:03:05 ioguix Exp $
+        * $Id: Misc.php,v 1.170 2008/02/18 22:20:26 ioguix Exp $
         */
 
        class Misc {
                                $sql_window_id = htmlspecialchars('sqledit:'.$_REQUEST['server']);
                                $history_url = "history.php?{$this->href}&amp;action=pophistory";
                                $history_window_id = htmlspecialchars('history:'.$_REQUEST['server']);
+                               $logout_shared = isset($_SESSION['sharedUsername']) ?
+                                       ' onclick="return confirm(\''. $lang['strconfdropcred']. '\')"':
+                                       '';
 
                                echo "<td style=\"text-align: right\">";
-
                                echo "<ul class=\"toplink\">\n\t<li><a class=\"toplink\" href=\"{$sql_url}sql\" target=\"sqledit\" onclick=\"window.open('{$sql_url}sql','{$sql_window_id}','toolbar=no,width=600,height=400,resizable=yes,scrollbars=no').focus(); return false;\">{$lang['strsql']}</a></li>\n";
-
                                echo "\t<li><a class=\"toplink\" href=\"{$history_url}\" onclick=\"window.open('{$history_url}','{$history_window_id}','toolbar=no,width=800,height=600,resizable=yes,scrollbars=yes').focus(); return false;\">{$lang['strhistory']}</a></li>\n";
-
                                echo "\t<li><a class=\"toplink\" href=\"{$sql_url}find\" target=\"sqledit\" onclick=\"window.open('{$sql_url}find','{$sql_window_id}','toolbar=no,width=600,height=400,resizable=yes,scrollbars=no').focus(); return false;\">{$lang['strfind']}</a></li>\n";
-
-                               echo "\t<li><a class=\"toplink\" href=\"servers.php?action=logout&amp;logoutServer=".htmlspecialchars($server_info['host']).":".htmlspecialchars($server_info['port']).":".htmlspecialchars($server_info['sslmode'])."\">{$lang['strlogout']}</a></li>\n</ul>\n";
-
+                               echo "\t<li><a class=\"toplink\" href=\"servers.php?action=logout&amp;logoutServer=".htmlspecialchars($server_info['host']).":".htmlspecialchars($server_info['port']).":".htmlspecialchars($server_info['sslmode'])."\"{$logout_shared}>{$lang['strlogout']}</a></li>\n";
+                               echo "</ul>\n";
                                echo "</td>";
                        }
 /*
index 35d3487ef0aae8c9c7223eb3f71764ad4ae5157a..510ddb99d45b170a3517c5b89ca740f46ba910fc 100755 (executable)
@@ -4,7 +4,7 @@
         * English language file for phpPgAdmin.  Use this as a basis
         * for new translations.
         *
-        * $Id: english.php,v 1.228 2007/12/19 18:34:44 soranzo Exp $
+        * $Id: english.php,v 1.229 2008/02/18 22:20:26 ioguix Exp $
         */
 
        // Language and character set
        $lang['strfile'] = 'File';
        $lang['strfileimported'] = 'File imported.';
        $lang['strtrycred'] = 'Use these credentials for all servers';
+       $lang['strconfdropcred'] = 'For security reason, disconnecting will destroy your shared login information. Are you sure you want to disconnect ?';
        $lang['stractionsonmultiplelines'] = 'Actions on multiple lines';
        $lang['strselectall'] = 'Select all';
        $lang['strunselectall'] = 'Unselect all';
index e44d8da56a7a52c897b0f52f211ccd92722b88d3..8af64060eda41df4b1bad5e9533f7475305dd0f4 100644 (file)
@@ -4,7 +4,7 @@
      * French Language file for phpPgAdmin. 
      * @maintainer Pascal PEYRE [pascal.peyre@cir.fr]
      *
-     * $Id: french.php,v 1.33 2007/12/19 11:08:14 ioguix Exp $
+     * $Id: french.php,v 1.34 2008/02/18 22:20:26 ioguix Exp $
      */
 
     // Language and character set
     $lang['strseparator']  =  ' :';
     $lang['strexpand'] = 'Étendre';
     $lang['strcollapse'] = 'Réduire';
-    $lang['strexplain'] = 'Explain';
-    $lang['strexplainanalyze']  =  'Explain Analyze';
     $lang['strfind'] = 'Rechercher';
     $lang['stroptions'] = 'Options';
     $lang['strrefresh'] = 'Rafraichir';
     $lang['strfile']  =  'Fichier';
     $lang['strfileimported']  =  'Fichier importé.';
     $lang['strtrycred']  =  'Utilisez ces identifiants pour tous les serveurs';
+       $lang['strconfdropcred']  =  'Par mesure de sécurité, la déconnexion détruira vos identifiants partagés pour tous les serveurs. Êtes-vous sûr de vouloir vous déconnecter ?';
        $lang['stractionsonmultiplelines']  =  'Actions sur plusieurs lignes';
        $lang['strselectall']  =  'Sélectionner tout';
        $lang['strunselectall']  =  'Desélectionner tout';
@@ -394,6 +393,7 @@ $lang['strlocale']  =  'Locale';
        $lang['strerrordupfields']  =  'Erreur en cas de champs dupliqués';
        $lang['strviewaltered']  =  'Vue modifiée.';
        $lang['strviewalteredbad']  =  'Échec lors de la modification de la vue.';
+$lang['strspecifyviewtodrop']  =  'You must specify at least one view to drop.';
 
     // Sequences
     $lang['strsequence'] = 'Séquence';
@@ -428,6 +428,7 @@ $lang['strlocale']  =  'Locale';
        $lang['strnextval']  =  'Incrémenter la valeur';
        $lang['strsequencenextval']  =  'Séquence incrémentée.';
        $lang['strsequencenextvalbad']  =  'Échec lors de l\'incrémentation de la valeur.';
+$lang['strspecifysequencetodrop']  =  'You must specify at least one sequence to drop.';
 
     // Indexes
     $lang['strindex']  =  'Index';
@@ -542,6 +543,7 @@ $lang['strlocale']  =  'Locale';
        $lang['strfunctioncosting']  =  'Coût de la function';
        $lang['strresultrows']  =  'Lignes de résultat';
        $lang['strexecutioncost']  =  'Coût d\'exécution';
+$lang['strspecifyfunctiontodrop']  =  'You must specify at least one function to drop.';
 
     // Triggers
     $lang['strtrigger'] = 'Trigger';
@@ -588,7 +590,6 @@ $lang['strlocale']  =  'Locale';
     $lang['strdelimiter'] = 'Délimiteur';
     $lang['strstorage'] = 'Stockage';
     $lang['strfield']  =  'Champ';
-       $lang['strvalue']  =  'Valeur';
     $lang['strnumfields']  =  'Nombre de champs';
        $lang['strnumvalues']  =  'Nombre de valeurs';
     $lang['strtypeneedsname'] = 'Vous devez indiquer un nom pour votre type.';
@@ -622,6 +623,7 @@ $lang['strlocale']  =  'Locale';
     $lang['strschemaaltered']  =  'Schema modifié.';
     $lang['strschemaalteredbad']  =  'Échec lors de la modification du schéma.';
     $lang['strsearchpath']  =  'Chemin de recherche du schéma';
+$lang['strspecifyschematodrop']  =  'You must specify at least one schema to drop.';
 
     // Reports
     $lang['strreport'] = 'Rapport';
@@ -970,11 +972,7 @@ $lang['strftsmappingaltered']  =  'FTS mapping altered.';
 $lang['strftsmappingalteredbad']  =  'FTS mapping alter failed.';
 $lang['strftsmappingadded']  =  'FTS mapping added.';
 $lang['strftsmappingaddedbad']  =  'FTS mapping add failed.';
-$lang['strftsmappingdropped']  =  'FTS mapping dropped.';
-$lang['strftsmappingdroppedbad']  =  'FTS mapping drop failed.';
        $lang['strftstabconfigs']  =  'Configurations';
        $lang['strftstabdicts']  =  'Dictionaires';
        $lang['strftstabparsers']  =  'Analyseurs syntaxique';
-       
-       
 ?>
index 7e987c6c2e2524020d6a38564c8eaeac419ddea9..dd9a8b0dd5dbba19adef1cbfd901a5fbe5462b76 100644 (file)
@@ -4,7 +4,7 @@
         * English language file for phpPgAdmin.  Use this as a basis
         * for new translations.
         *
-        * $Id: english.php,v 1.179 2007/12/19 18:34:44 soranzo Exp $
+        * $Id: english.php,v 1.180 2008/02/18 22:20:26 ioguix Exp $
         */
 
        // Language and character set
        $lang['strfile'] = 'File';
        $lang['strfileimported'] = 'File imported.';
        $lang['strtrycred'] = 'Use these credentials for all servers';
+       $lang['strconfdropcred'] = 'For security reason, disconnecting will destroy your shared login information. Are you sure you want to disconnect ?';
        $lang['stractionsonmultiplelines'] = 'Actions on multiple lines';
        $lang['strselectall'] = 'Select all';
        $lang['strunselectall'] = 'Unselect all';
index 139e4062f8479be82b6137c42064372681c726c5..63c48d053d1e3eb786825b7d0a6f5489de8cc505 100644 (file)
@@ -4,7 +4,7 @@
      * French Language file for phpPgAdmin. 
      * @maintainer Pascal PEYRE [pascal.peyre@cir.fr]
      *
-     * $Id: french.php,v 1.33 2007/12/19 11:08:14 ioguix Exp $
+     * $Id: french.php,v 1.34 2008/02/18 22:20:26 ioguix Exp $
      */
 
     // Language and character set
     $lang['strseparator']  =  ' :';
     $lang['strexpand'] = '&#201;tendre';
     $lang['strcollapse'] = 'R&#233;duire';
-    $lang['strexplain'] = 'Explain';
-    $lang['strexplainanalyze']  =  'Explain Analyze';
     $lang['strfind'] = 'Rechercher';
     $lang['stroptions'] = 'Options';
     $lang['strrefresh'] = 'Rafraichir';
     $lang['strfile']  =  'Fichier';
     $lang['strfileimported']  =  'Fichier import&#233;.';
     $lang['strtrycred']  =  'Utilisez ces identifiants pour tous les serveurs';
+       $lang['strconfdropcred']  =  'Par mesure de s&#233;curit&#233;, la d&#233;connexion d&#233;truira vos identifiants partag&#233;s pour tous les serveurs. &#202;tes-vous s&#251;r de vouloir vous d&#233;connecter ?';
        $lang['stractionsonmultiplelines']  =  'Actions sur plusieurs lignes';
        $lang['strselectall']  =  'S&#233;lectionner tout';
        $lang['strunselectall']  =  'Des&#233;lectionner tout';
@@ -394,6 +393,7 @@ $lang['strlocale']  =  'Locale';
        $lang['strerrordupfields']  =  'Erreur en cas de champs dupliqu&#233;s';
        $lang['strviewaltered']  =  'Vue modifi&#233;e.';
        $lang['strviewalteredbad']  =  '&#201;chec lors de la modification de la vue.';
+$lang['strspecifyviewtodrop']  =  'You must specify at least one view to drop.';
 
     // Sequences
     $lang['strsequence'] = 'S&#233;quence';
@@ -428,6 +428,7 @@ $lang['strlocale']  =  'Locale';
        $lang['strnextval']  =  'Incr&#233;menter la valeur';
        $lang['strsequencenextval']  =  'S&#233;quence incr&#233;ment&#233;e.';
        $lang['strsequencenextvalbad']  =  '&#201;chec lors de l\'incr&#233;mentation de la valeur.';
+$lang['strspecifysequencetodrop']  =  'You must specify at least one sequence to drop.';
 
     // Indexes
     $lang['strindex']  =  'Index';
@@ -542,6 +543,7 @@ $lang['strlocale']  =  'Locale';
        $lang['strfunctioncosting']  =  'Co&#251;t de la function';
        $lang['strresultrows']  =  'Lignes de r&#233;sultat';
        $lang['strexecutioncost']  =  'Co&#251;t d\'ex&#233;cution';
+$lang['strspecifyfunctiontodrop']  =  'You must specify at least one function to drop.';
 
     // Triggers
     $lang['strtrigger'] = 'Trigger';
@@ -588,7 +590,6 @@ $lang['strlocale']  =  'Locale';
     $lang['strdelimiter'] = 'D&#233;limiteur';
     $lang['strstorage'] = 'Stockage';
     $lang['strfield']  =  'Champ';
-       $lang['strvalue']  =  'Valeur';
     $lang['strnumfields']  =  'Nombre de champs';
        $lang['strnumvalues']  =  'Nombre de valeurs';
     $lang['strtypeneedsname'] = 'Vous devez indiquer un nom pour votre type.';
@@ -622,6 +623,7 @@ $lang['strlocale']  =  'Locale';
     $lang['strschemaaltered']  =  'Schema modifi&#233;.';
     $lang['strschemaalteredbad']  =  '&#201;chec lors de la modification du sch&#233;ma.';
     $lang['strsearchpath']  =  'Chemin de recherche du sch&#233;ma';
+$lang['strspecifyschematodrop']  =  'You must specify at least one schema to drop.';
 
     // Reports
     $lang['strreport'] = 'Rapport';
@@ -970,11 +972,7 @@ $lang['strftsmappingaltered']  =  'FTS mapping altered.';
 $lang['strftsmappingalteredbad']  =  'FTS mapping alter failed.';
 $lang['strftsmappingadded']  =  'FTS mapping added.';
 $lang['strftsmappingaddedbad']  =  'FTS mapping add failed.';
-$lang['strftsmappingdropped']  =  'FTS mapping dropped.';
-$lang['strftsmappingdroppedbad']  =  'FTS mapping drop failed.';
        $lang['strftstabconfigs']  =  'Configurations';
        $lang['strftstabdicts']  =  'Dictionaires';
        $lang['strftstabparsers']  =  'Analyseurs syntaxique';
-       
-       
 ?>
index e0c9ce1f502f24f371cb66e902eaca14abb8822c..7aba25923e0aa8c8dec4f9a4ce16a65b2b018f9e 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Manage servers
         *
-        * $Id: servers.php,v 1.11 2007/08/31 18:30:11 ioguix Exp $
+        * $Id: servers.php,v 1.12 2008/02/18 22:20:26 ioguix Exp $
         */
 
        // Include application functions
@@ -18,6 +18,9 @@
                
                $server_info = $misc->getServerInfo($_REQUEST['logoutServer']);
                $misc->setServerInfo(null, null, $_REQUEST['logoutServer']);
+
+               unset($_SESSION['sharedUsername'], $_SESSION['sharedPassword']);
+
                doDefault(sprintf($lang['strlogoutmsg'], $server_info['desc']));
                
                $_reload_browser = true;