Code

Added check for non posted variables (if limited by certain PHP plugins)
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 8 Sep 2008 11:26:01 +0000 (11:26 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 8 Sep 2008 11:26:01 +0000 (11:26 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12374 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/html/main.php
gosa-core/ihtml/themes/default/framework.tpl

index 77bcbc9b16e2c0c578c77c0bbb19981687f12247..4df1c769cd719fac78dfc5f497ffecfc7fe92573 100644 (file)
@@ -369,6 +369,17 @@ if (is_file("$plugin_dir/main.inc")){
 $smarty->assign("msg_dialogs", msg_dialog::get_dialogs());
 $smarty->assign("contents", $display);
 
+/* If there's some post, take a look if everything is there... */
+if (isset($_POST) && count($_POST)){
+  if (!isset($_POST['php_c_check'])){
+    msg_dialog::display(
+            _("Configuration Error"),
+            sprintf(_("FATAL: not all POST variables have been transfered by PHP - please inform your administrator!")),
+            FATAL_ERROR_DIALOG);
+    exit();
+  }
+}
+
 /* Assign erros to smarty */
 if (session::is_set('errors')){
   $smarty->assign("errors", session::get('errors'));
index 22b4114c312f9ab81997c427c4f212ad57a81184..4d9f8f9b1e87208f37c18944268836135d2e8883 100644 (file)
@@ -52,4 +52,4 @@
      </table>
     </td>
   </tr>
-</table>{$errors}{$focus}</form></body></html>
+</table>{$errors}{$focus}<input type="hidden" name="php_c_check" value="1"></form></body></html>