From f8aec0f1a8de475f84b46085ad18655a4d39b8e0 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 30 Dec 2007 13:15:39 +0000 Subject: [PATCH] added new security model --- lam/templates/massBuildAccounts.php | 3 +++ lam/templates/massDoUpload.php | 3 +++ lam/templates/masscreate.php | 3 +++ lam/templates/ou_edit.php | 3 +++ lam/templates/pdfedit/pdfdelete.php | 3 +++ lam/templates/pdfedit/pdfmain.php | 7 +++++-- lam/templates/pdfedit/pdfpage.php | 3 +++ lam/templates/profedit/profiledelete.php | 3 +++ lam/templates/profedit/profilemain.php | 3 +++ lam/templates/profedit/profilepage.php | 3 +++ lam/templates/tests/index.php | 3 +++ lam/templates/tests/lamdaemonTest.php | 3 +++ lam/templates/tests/schemaTest.php | 3 +++ 13 files changed, 41 insertions(+), 2 deletions(-) diff --git a/lam/templates/massBuildAccounts.php b/lam/templates/massBuildAccounts.php index 5a15611b..19868550 100644 --- a/lam/templates/massBuildAccounts.php +++ b/lam/templates/massBuildAccounts.php @@ -41,6 +41,9 @@ include_once('../lib/modules.inc'); // Start session startSecureSession(); +// die if no write access +if (!checkIfWriteAccessIsAllowed()) die(); + // Redirect to startpage if user is not loged in if (!isset($_SESSION['loggedIn'])) { metaRefresh("login.php"); diff --git a/lam/templates/massDoUpload.php b/lam/templates/massDoUpload.php index e043eb48..68631242 100644 --- a/lam/templates/massDoUpload.php +++ b/lam/templates/massDoUpload.php @@ -45,6 +45,9 @@ include_once('../lib/cache.inc'); // Start session startSecureSession(); +// die if no write access +if (!checkIfWriteAccessIsAllowed()) die(); + // Redirect to startpage if user is not loged in if (!isset($_SESSION['loggedIn'])) { metaRefresh("login.php"); diff --git a/lam/templates/masscreate.php b/lam/templates/masscreate.php index cffced08..2a1d3349 100644 --- a/lam/templates/masscreate.php +++ b/lam/templates/masscreate.php @@ -41,6 +41,9 @@ include_once('../lib/modules.inc'); // Start session startSecureSession(); +// die if no write access +if (!checkIfWriteAccessIsAllowed()) die(); + // Redirect to startpage if user is not loged in if (!isset($_SESSION['loggedIn'])) { metaRefresh("login.php"); diff --git a/lam/templates/ou_edit.php b/lam/templates/ou_edit.php index db4481b5..0475e83f 100644 --- a/lam/templates/ou_edit.php +++ b/lam/templates/ou_edit.php @@ -40,6 +40,9 @@ include_once("../lib/status.inc"); // start session startSecureSession(); +// die if no write access +if (!checkIfWriteAccessIsAllowed()) die(); + setlanguage(); $types = $_SESSION['config']->get_ActiveTypes(); diff --git a/lam/templates/pdfedit/pdfdelete.php b/lam/templates/pdfedit/pdfdelete.php index 1a909da9..5629f380 100644 --- a/lam/templates/pdfedit/pdfdelete.php +++ b/lam/templates/pdfedit/pdfdelete.php @@ -37,6 +37,9 @@ include_once('../../lib/pdfstruct.inc'); // start session startSecureSession(); +// die if no write access +if (!checkIfWriteAccessIsAllowed()) die(); + setlanguage(); // check if user is logged in, if not go to login diff --git a/lam/templates/pdfedit/pdfmain.php b/lam/templates/pdfedit/pdfmain.php index 27b8e8ff..a7188e8c 100644 --- a/lam/templates/pdfedit/pdfmain.php +++ b/lam/templates/pdfedit/pdfmain.php @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam) - Copyright (C) 2003 - 2006 Michael Dürgner + Copyright (C) 2003 - 2006 Michael D�rgner This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -24,7 +24,7 @@ $Id$ /** * This is the main window of the pdf structure editor. * -* @author Michael Dürgner +* @author Michael D�rgner * @package PDF */ @@ -42,6 +42,9 @@ include_once("../../lib/modules.inc"); // start session startSecureSession(); +// die if no write access +if (!checkIfWriteAccessIsAllowed()) die(); + setlanguage(); // Unset pdf structure definitions in session if set diff --git a/lam/templates/pdfedit/pdfpage.php b/lam/templates/pdfedit/pdfpage.php index 1f8b2474..0afb2f53 100644 --- a/lam/templates/pdfedit/pdfpage.php +++ b/lam/templates/pdfedit/pdfpage.php @@ -48,6 +48,9 @@ include_once('../../lib/xml_parser.inc'); // start session startSecureSession(); +// die if no write access +if (!checkIfWriteAccessIsAllowed()) die(); + setlanguage(); // check if user is logged in, if not go to login diff --git a/lam/templates/profedit/profiledelete.php b/lam/templates/profedit/profiledelete.php index 34dba842..e7b4db04 100644 --- a/lam/templates/profedit/profiledelete.php +++ b/lam/templates/profedit/profiledelete.php @@ -40,6 +40,9 @@ include_once("../../lib/config.inc"); // start session startSecureSession(); +// die if no write access +if (!checkIfWriteAccessIsAllowed()) die(); + setlanguage(); // check if user is logged in, if not go to login diff --git a/lam/templates/profedit/profilemain.php b/lam/templates/profedit/profilemain.php index 42f11493..3e1d82fb 100644 --- a/lam/templates/profedit/profilemain.php +++ b/lam/templates/profedit/profilemain.php @@ -40,6 +40,9 @@ include_once("../../lib/config.inc"); // start session startSecureSession(); +// die if no write access +if (!checkIfWriteAccessIsAllowed()) die(); + setlanguage(); $types = $_SESSION['config']->get_ActiveTypes(); diff --git a/lam/templates/profedit/profilepage.php b/lam/templates/profedit/profilepage.php index 1d59d3d4..38379e72 100644 --- a/lam/templates/profedit/profilepage.php +++ b/lam/templates/profedit/profilepage.php @@ -44,6 +44,9 @@ include_once("../../lib/status.inc"); // start session startSecureSession(); +// die if no write access +if (!checkIfWriteAccessIsAllowed()) die(); + setlanguage(); // check if user is logged in, if not go to login diff --git a/lam/templates/tests/index.php b/lam/templates/tests/index.php index a2500042..dca13973 100644 --- a/lam/templates/tests/index.php +++ b/lam/templates/tests/index.php @@ -36,6 +36,9 @@ include_once("../../lib/config.inc"); // start session startSecureSession(); +// die if no write access +if (!checkIfWriteAccessIsAllowed()) die(); + setlanguage(); echo $_SESSION['header']; diff --git a/lam/templates/tests/lamdaemonTest.php b/lam/templates/tests/lamdaemonTest.php index 12ff7c59..ea741589 100644 --- a/lam/templates/tests/lamdaemonTest.php +++ b/lam/templates/tests/lamdaemonTest.php @@ -37,6 +37,9 @@ include_once("../../lib/config.inc"); // start session startSecureSession(); +// die if no write access +if (!checkIfWriteAccessIsAllowed()) die(); + setlanguage(); echo $_SESSION['header']; diff --git a/lam/templates/tests/schemaTest.php b/lam/templates/tests/schemaTest.php index 13a42637..243e967b 100644 --- a/lam/templates/tests/schemaTest.php +++ b/lam/templates/tests/schemaTest.php @@ -40,6 +40,9 @@ include_once("../../lib/schema.inc"); // start session startSecureSession(); +// die if no write access +if (!checkIfWriteAccessIsAllowed()) die(); + setlanguage(); echo $_SESSION['header'];