Bernd Wurst commited on 2013-01-29 09:11:45
Zeige 1 geänderte Dateien mit 6 Einfügungen und 3 Löschungen.
... | ... |
@@ -15,8 +15,12 @@ Nevertheless, in case you use a significant part of this code, we ask (but not r |
15 | 15 |
*/ |
16 | 16 |
|
17 | 17 |
require_once('inc/debug.php'); |
18 |
+if (! isset($_SESSION['admin_user'])) { |
|
19 |
+ session_destroy(); |
|
20 |
+ redirect($prefix.'go/su/su'); |
|
21 |
+ die(); |
|
22 |
+} |
|
18 | 23 |
|
19 |
-if (isset($_SESSION['admin_user']) ) { |
|
20 | 24 |
$admin_user = $_SESSION['admin_user']; |
21 | 25 |
$role = find_role($admin_user, '', True); |
22 | 26 |
if ($role & ROLE_SYSADMIN) { |
... | ... |
@@ -25,7 +29,6 @@ if (isset($_SESSION['admin_user']) ) { |
25 | 29 |
header('Location: '.$prefix.'go/su/su'); |
26 | 30 |
die(); |
27 | 31 |
} |
28 |
-} |
|
29 |
-system_failure('Unprivilleged action'); |
|
32 |
+ |
|
30 | 33 |
|
31 | 34 |
|
32 | 35 |