bernd commited on 2008-08-08 19:35:02
Zeige 5 geänderte Dateien mit 21 Einfügungen und 44 Löschungen.
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1130 87cf0b9e-d624-0410-a070-f6ee81989793
| ... | ... |
@@ -10,7 +10,7 @@ function db_query($query) |
| 10 | 10 |
if (mysql_error()) |
| 11 | 11 |
{
|
| 12 | 12 |
$error = mysql_error(); |
| 13 |
- logger("inc/base.php", "dberror", "mysql error: {$error}");
|
|
| 13 |
+ logger("inc/base", "dberror", "mysql error: {$error}");
|
|
| 14 | 14 |
system_failure('Interner Datenbankfehler: »'.iconv('ISO-8859-1', 'UTF-8', $error).'«.');
|
| 15 | 15 |
} |
| 16 | 16 |
return $result; |
| ... | ... |
@@ -13,7 +13,7 @@ function strong_password($password) |
| 13 | 13 |
DEBUG("Öffne Wörterbuch: {$config['cracklib_dict']}");
|
| 14 | 14 |
if (! ($dict = crack_opendict($config['cracklib_dict']))) |
| 15 | 15 |
{
|
| 16 |
- logger("inc/security.php", "cracklib", "could not open cracklib-dictionary »{$config['cracklib_dict']}«");
|
|
| 16 |
+ logger("inc/security", "cracklib", "could not open cracklib-dictionary »{$config['cracklib_dict']}«");
|
|
| 17 | 17 |
system_failure("Kann Crack-Lib-Wörterbuch nicht öffnen: {$config['cracklib_dict']}");
|
| 18 | 18 |
} |
| 19 | 19 |
// Führe eine Überprüfung des Passworts durch |
| ... | ... |
@@ -45,7 +45,7 @@ function verify_input_general( $input ) |
| 45 | 45 |
{
|
| 46 | 46 |
if (filter_input_general($input) != $input) {
|
| 47 | 47 |
system_failure("Ihre Daten enthielten ungültige Zeichen!");
|
| 48 |
- logger('inc/security.php', 'verify_input_general', 'Ungültige Daten: '.$input);
|
|
| 48 |
+ logger('inc/security', 'verify_input_general', 'Ungültige Daten: '.$input);
|
|
| 49 | 49 |
} |
| 50 | 50 |
} |
| 51 | 51 |
|
| ... | ... |
@@ -59,7 +59,7 @@ function verify_input_username( $input ) |
| 59 | 59 |
{
|
| 60 | 60 |
if (filter_input_username( $input ) != $input) {
|
| 61 | 61 |
system_failure("Ihre Daten enthielten ungültige Zeichen!");
|
| 62 |
- logger('inc/security.php', 'verify_input_username', 'Ungültige Daten: '.$input);
|
|
| 62 |
+ logger('inc/security', 'verify_input_username', 'Ungültige Daten: '.$input);
|
|
| 63 | 63 |
} |
| 64 | 64 |
} |
| 65 | 65 |
|
| ... | ... |
@@ -104,7 +104,7 @@ function check_path( $input ) |
| 104 | 104 |
DEBUG("checking {$input} for valid path name");
|
| 105 | 105 |
if ($input != filter_input_general($input)) |
| 106 | 106 |
{
|
| 107 |
- logger('inc/security.php', 'check_path', 'HTML-Krams im Pfad: '.$input);
|
|
| 107 |
+ logger('inc/security', 'check_path', 'HTML-Krams im Pfad: '.$input);
|
|
| 108 | 108 |
DEBUG("HTML-Krams im Pfad");
|
| 109 | 109 |
return False; |
| 110 | 110 |
} |
| ... | ... |
@@ -113,7 +113,7 @@ function check_path( $input ) |
| 113 | 113 |
{
|
| 114 | 114 |
if ($item == '..') |
| 115 | 115 |
{
|
| 116 |
- logger('inc/security.php', 'check_path', '»..« im Pfad: '.$input);
|
|
| 116 |
+ logger('inc/security', 'check_path', '»..« im Pfad: '.$input);
|
|
| 117 | 117 |
DEBUG("»..« im Pfad");
|
| 118 | 118 |
return False; |
| 119 | 119 |
} |
| ... | ... |
@@ -59,29 +59,6 @@ foreach ($submenu AS $weight => $data) {
|
| 59 | 59 |
DEBUG($submenu); |
| 60 | 60 |
|
| 61 | 61 |
|
| 62 |
- |
|
| 63 |
-/* |
|
| 64 |
-$menuitem["index"]["label"] = "Übersicht"; |
|
| 65 |
-$menuitem["index"]["file"] = "index.php"; |
|
| 66 |
- |
|
| 67 |
- |
|
| 68 |
-$menuitem["domains"]["label"] = "Domains"; |
|
| 69 |
-$menuitem["domains"]["file"] = "domains.php"; |
|
| 70 |
- |
|
| 71 |
- |
|
| 72 |
-$menuitem["mail"]["label"] = "E-Mail"; |
|
| 73 |
-$menuitem["mail"]["file"] = "mail.php"; |
|
| 74 |
- |
|
| 75 |
-$menuitem["chpass"]["label"] = "Passwort ändern"; |
|
| 76 |
-$menuitem["chpass"]["file"] = "chpass.php"; |
|
| 77 |
- |
|
| 78 |
- |
|
| 79 |
-$menuitem["logout"]["label"] = "Abmelden"; |
|
| 80 |
-$menuitem["logout"]["file"] = "logout.php"; |
|
| 81 |
- |
|
| 82 |
-*/ |
|
| 83 |
- |
|
| 84 |
- |
|
| 85 | 62 |
header("Content-Type: {$config['mime_type']}");
|
| 86 | 63 |
?> |
| 87 | 64 |
<?php echo '<?xml version="1.0" encoding="utf-8"?>'."\n"; ?> |
| ... | ... |
@@ -37,12 +37,12 @@ function find_role($login, $password, $i_am_admin = False) |
| 37 | 37 |
$role = $role | ROLE_CUSTOMER; |
| 38 | 38 |
if ($entry->admin) |
| 39 | 39 |
$role = $role | ROLE_SYSADMIN; |
| 40 |
- logger("session/checkuser.php", "login", "logged in systemuser »{$login}«.");
|
|
| 40 |
+ logger("session/checkuser", "login", "logged in systemuser »{$login}«.");
|
|
| 41 | 41 |
return $role; |
| 42 | 42 |
} |
| 43 |
- logger("session/checkuser.php", "login", "wrong password for existing useraccount »{$login}«.");
|
|
| 43 |
+ logger("session/checkuser", "login", "wrong password for existing useraccount »{$login}«.");
|
|
| 44 | 44 |
} else {
|
| 45 |
- logger("session/checkuser.php", "login", "did not find useraccount »{$login}«. trying other roles...");
|
|
| 45 |
+ logger("session/checkuser", "login", "did not find useraccount »{$login}«. trying other roles...");
|
|
| 46 | 46 |
} |
| 47 | 47 |
|
| 48 | 48 |
// Customer? |
| ... | ... |
@@ -69,10 +69,10 @@ function find_role($login, $password, $i_am_admin = False) |
| 69 | 69 |
$hash = crypt($password, $db_password); |
| 70 | 70 |
if ($hash == $db_password || $i_am_admin) |
| 71 | 71 |
{
|
| 72 |
- logger("session/checkuser.php", "login", "logged in e-mail-account »{$account}«.");
|
|
| 72 |
+ logger("session/checkuser", "login", "logged in e-mail-account »{$account}«.");
|
|
| 73 | 73 |
return ROLE_MAILACCOUNT; |
| 74 | 74 |
} |
| 75 |
- logger("session/checkuser.php", "login", "wrong password for existing e-mail-account »{$account}«.");
|
|
| 75 |
+ logger("session/checkuser", "login", "wrong password for existing e-mail-account »{$account}«.");
|
|
| 76 | 76 |
} |
| 77 | 77 |
|
| 78 | 78 |
// virtueller Mail-Account |
| ... | ... |
@@ -85,10 +85,10 @@ function find_role($login, $password, $i_am_admin = False) |
| 85 | 85 |
$hash = crypt($password, $db_password); |
| 86 | 86 |
if ($hash == $db_password || $i_am_admin) |
| 87 | 87 |
{
|
| 88 |
- logger("session/checkuser.php", "login", "logged in virtual e-mail-account »{$account}«.");
|
|
| 88 |
+ logger("session/checkuser", "login", "logged in virtual e-mail-account »{$account}«.");
|
|
| 89 | 89 |
return ROLE_VMAIL_ACCOUNT; |
| 90 | 90 |
} |
| 91 |
- logger("session/checkuser.php", "login", "wrong password for existing virtual e-mail-account »{$account}«.");
|
|
| 91 |
+ logger("session/checkuser", "login", "wrong password for existing virtual e-mail-account »{$account}«.");
|
|
| 92 | 92 |
} |
| 93 | 93 |
|
| 94 | 94 |
|
| ... | ... |
@@ -146,7 +146,7 @@ function get_user_info($username) |
| 146 | 146 |
FROM system.v_useraccounts WHERE username='{$username}' OR uid='{$username}' LIMIT 1");
|
| 147 | 147 |
if (mysql_num_rows($result) < 1) |
| 148 | 148 |
{
|
| 149 |
- logger("session/checkuser.php", "login", "error reading user's data: »{$username}«");
|
|
| 149 |
+ logger("session/checkuser", "login", "error reading user's data: »{$username}«");
|
|
| 150 | 150 |
system_failure('Das Auslesen Ihrer Benutzerdaten ist fehlgeschlagen. Bitte melden Sie dies einem Administrator');
|
| 151 | 151 |
} |
| 152 | 152 |
$val = @mysql_fetch_object($result); |
| ... | ... |
@@ -163,7 +163,7 @@ function set_customer_verified($customerno) |
| 163 | 163 |
{
|
| 164 | 164 |
$customerno = (int) $customerno; |
| 165 | 165 |
db_query("UPDATE kundendaten.kunden SET status=0 WHERE id={$customerno};");
|
| 166 |
- logger("session/checkuser.php", "register", "set customer's status to 0.");
|
|
| 166 |
+ logger("session/checkuser", "register", "set customer's status to 0.");
|
|
| 167 | 167 |
} |
| 168 | 168 |
|
| 169 | 169 |
function set_customer_lastlogin($customerno) |
| ... | ... |
@@ -177,7 +177,7 @@ function set_customer_password($customerno, $newpass) |
| 177 | 177 |
$customerno = (int) $customerno; |
| 178 | 178 |
$newpass = sha1($newpass); |
| 179 | 179 |
db_query("UPDATE kundendaten.kunden SET passwort='$newpass' WHERE id='".$customerno."' LIMIT 1");
|
| 180 |
- logger("session/checkuser.php", "pwchange", "changed customer's password.");
|
|
| 180 |
+ logger("session/checkuser", "pwchange", "changed customer's password.");
|
|
| 181 | 181 |
} |
| 182 | 182 |
|
| 183 | 183 |
|
| ... | ... |
@@ -188,7 +188,7 @@ function set_systemuser_password($uid, $newpass) |
| 188 | 188 |
$salt = random_string(8); |
| 189 | 189 |
$newpass = crypt($newpass, "\$1\${$salt}\$");
|
| 190 | 190 |
db_query("UPDATE system.passwoerter SET passwort='$newpass' WHERE uid='".$uid."' LIMIT 1");
|
| 191 |
- logger("session/checkuser.php", "pwchange", "changed user's password.");
|
|
| 191 |
+ logger("session/checkuser", "pwchange", "changed user's password.");
|
|
| 192 | 192 |
} |
| 193 | 193 |
|
| 194 | 194 |
|
| ... | ... |
@@ -201,7 +201,7 @@ function setup_session($role, $useridentity) |
| 201 | 201 |
DEBUG("We are system user");
|
| 202 | 202 |
$info = get_user_info($useridentity); |
| 203 | 203 |
$_SESSION['userinfo'] = $info; |
| 204 |
- logger("session/start.php", "login", "logged in user »{$info['username']}«");
|
|
| 204 |
+ logger("session/start", "login", "logged in user »{$info['username']}«");
|
|
| 205 | 205 |
$useridentity = $info['customerno']; |
| 206 | 206 |
} |
| 207 | 207 |
if ($role & ROLE_CUSTOMER) |
| ... | ... |
@@ -209,7 +209,7 @@ function setup_session($role, $useridentity) |
| 209 | 209 |
$info = get_customer_info($useridentity); |
| 210 | 210 |
$_SESSION['customerinfo'] = $info; |
| 211 | 211 |
set_customer_lastlogin($info['customerno']); |
| 212 |
- logger("session/start.php", "login", "logged in customer no »{$info['customerno']}«");
|
|
| 212 |
+ logger("session/start", "login", "logged in customer no »{$info['customerno']}«");
|
|
| 213 | 213 |
} |
| 214 | 214 |
if ($role & ROLE_MAILACCOUNT) |
| 215 | 215 |
{
|
| ... | ... |
@@ -15,7 +15,7 @@ session_name('CONFIG_SCHOKOKEKS_ORG');
|
| 15 | 15 |
|
| 16 | 16 |
if (!session_start()) |
| 17 | 17 |
{
|
| 18 |
- logger("session/start.php", "session", "Die session konnte nicht gestartet werden!");
|
|
| 18 |
+ logger("session/start", "session", "Die session konnte nicht gestartet werden!");
|
|
| 19 | 19 |
system_failure('Die Sitzung konnte nicht gestartet werden, bitte benachrichtigen Sie den Administrator!');
|
| 20 | 20 |
} |
| 21 | 21 |
|
| ... | ... |
@@ -27,7 +27,7 @@ if (isset($_POST['username']) && isset($_POST['password'])) |
| 27 | 27 |
if ($role === NULL) |
| 28 | 28 |
{
|
| 29 | 29 |
$_SESSION['role'] = ROLE_ANONYMOUS; |
| 30 |
- logger("session/start.php", "login", "wrong user data (username: »{$_POST['username']}«)");
|
|
| 30 |
+ logger("session/start", "login", "wrong user data (username: »{$_POST['username']}«)");
|
|
| 31 | 31 |
login_screen('Ihre Anmeldung konnte nicht durchgeführt werden. Vermutlich haben Sie falsche Zugangsdaten eingegeben.');
|
| 32 | 32 |
} |
| 33 | 33 |
else |
| 34 | 34 |