[Fusionforge-commits] r9496 - in trunk/gforge/www: admin include themes/css

Alain Peyrat aljeux at libremir.placard.fr.eu.org
Wed Apr 14 22:33:59 CEST 2010


Author: aljeux
Date: 2010-04-14 22:33:59 +0200 (Wed, 14 Apr 2010)
New Revision: 9496

Modified:
   trunk/gforge/www/admin/admin_utils.php
   trunk/gforge/www/include/html.php
   trunk/gforge/www/themes/css/fusionforge.css
Log:
Add a warning in the admin area if php register_globals is On.

Modified: trunk/gforge/www/admin/admin_utils.php
===================================================================
--- trunk/gforge/www/admin/admin_utils.php	2010-04-14 20:13:11 UTC (rev 9495)
+++ trunk/gforge/www/admin/admin_utils.php	2010-04-14 20:33:59 UTC (rev 9496)
@@ -27,6 +27,9 @@
 	if (get_magic_quotes_gpc()) {
 		$GLOBALS['warning_msg'] = 'WARNING: Your installation is running with php magic_quotes_gpc ON, please change to OFF';
 	}
+	if (ini_get('register_globals')) {
+		$GLOBALS['warning_msg'] = 'WARNING: Your installation is running with php register_globals ON, this is very unsecure, please change to OFF';
+	}
 	site_header($params);
 }
 

Modified: trunk/gforge/www/include/html.php
===================================================================
--- trunk/gforge/www/include/html.php	2010-04-14 20:13:11 UTC (rev 9495)
+++ trunk/gforge/www/include/html.php	2010-04-14 20:33:59 UTC (rev 9496)
@@ -622,7 +622,16 @@
 		Check to see if logged in
 	*/
 	echo $HTML->header($params);
-	echo html_feedback_top($GLOBALS['feedback']);
+
+	if(isset($GLOBALS['error_msg']) && $GLOBALS['error_msg']) {
+		echo html_error_top($GLOBALS['error_msg']);
+	}
+	if(isset($GLOBALS['warning_msg']) && $GLOBALS['warning_msg']) {
+		echo html_warning_top($GLOBALS['warning_msg']);
+	}
+	if(isset($GLOBALS['feedback']) && $GLOBALS['feedback']) {
+		echo html_feedback_top($GLOBALS['feedback']);
+	}
 }
 
 /**

Modified: trunk/gforge/www/themes/css/fusionforge.css
===================================================================
--- trunk/gforge/www/themes/css/fusionforge.css	2010-04-14 20:13:11 UTC (rev 9495)
+++ trunk/gforge/www/themes/css/fusionforge.css	2010-04-14 20:33:59 UTC (rev 9496)
@@ -97,3 +97,14 @@
 }
 table.progress td { background: #fff; padding: 0 }
 table.progress td :hover { background: none }
+
+/* style for warning messages box
+*/
+.warning_msg {
+    font-weight: bold;
+    border-width: 2px;
+    border-style: solid;
+    background-color: #ffd297; /* orange */
+    border-color: #FFA500; /* orange */
+    padding: 0.5em;
+}




More information about the Fusionforge-commits mailing list