bernd commited on 2009-05-23 15:55:23
Zeige 11 geänderte Dateien mit 20 Einfügungen und 20 Löschungen.
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1377 87cf0b9e-d624-0410-a070-f6ee81989793
| ... | ... |
@@ -5,15 +5,15 @@ require_once('inc/error.php');
|
| 5 | 5 |
|
| 6 | 6 |
function strong_password($password) |
| 7 | 7 |
{
|
| 8 |
- if (isset(config('use_cracklib')) and config('use_cracklib') == false) {
|
|
| 8 |
+ if (config('use_cracklib') === NULL or config('use_cracklib') === false) {
|
|
| 9 | 9 |
DEBUG('Cracklib deaktiviert');
|
| 10 | 10 |
return true; |
| 11 | 11 |
} |
| 12 |
- DEBUG("Öffne Wörterbuch: {config('cracklib_dict')}");
|
|
| 12 |
+ DEBUG("Öffne Wörterbuch: ".config('cracklib_dict'));
|
|
| 13 | 13 |
if (! ($dict = crack_opendict(config('cracklib_dict'))))
|
| 14 | 14 |
{
|
| 15 |
- logger("inc/security", "cracklib", "could not open cracklib-dictionary »{config('cracklib_dict')}«");
|
|
| 16 |
- system_failure("Kann Crack-Lib-Wörterbuch nicht öffnen: {config('cracklib_dict')}");
|
|
| 15 |
+ logger("inc/security", "cracklib", "could not open cracklib-dictionary »".config('cracklib_dict')."«");
|
|
| 16 |
+ system_failure("Kann Crack-Lib-Wörterbuch nicht öffnen: ".config('cracklib_dict'));
|
|
| 17 | 17 |
} |
| 18 | 18 |
// Führe eine Überprüfung des Passworts durch |
| 19 | 19 |
$check = crack_check($dict, $password); |
| ... | ... |
@@ -58,7 +58,7 @@ foreach ($submenu AS $weight => $data) {
|
| 58 | 58 |
DEBUG($submenu); |
| 59 | 59 |
|
| 60 | 60 |
|
| 61 |
-header("Content-Type: {config('mime_type')}");
|
|
| 61 |
+header("Content-Type: ".config('mime_type'));
|
|
| 62 | 62 |
?> |
| 63 | 63 |
<?php echo '<?xml version="1.0" encoding="utf-8"?>'."\n"; ?> |
| 64 | 64 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" |
| ... | ... |
@@ -41,7 +41,7 @@ foreach ($auto_records AS $rec) |
| 41 | 41 |
{
|
| 42 | 42 |
$data = ( $rec['ip'] ? $rec['ip'] : $rec['data'] ); |
| 43 | 43 |
$ttl = ($rec['ttl'] ? $rec['ttl'] : 3600); |
| 44 |
- output("<tr><td><em>{$rec['fqdn']}</td><td>".strtoupper($rec['type'])."</td><td>$data</td><td>{$ttl} Sek.</td><td> </td></tr>\n");
|
|
| 44 |
+ output("<tr><td><em>{$rec['fqdn']}</em></td><td>".strtoupper($rec['type'])."</td><td>$data</td><td>{$ttl} Sek.</td><td> </td></tr>\n");
|
|
| 45 | 45 |
|
| 46 | 46 |
} |
| 47 | 47 |
|
| ... | ... |
@@ -101,6 +101,6 @@ output(html_form('dns_record_edit', 'dns_record_save', "type={$type}&domain={$do
|
| 101 | 101 |
<tr><td><label for="ttl">TTL:</label></td><td><input type="text" name="ttl" id="ttl" value="'.$data['ttl'].'" /></td></tr> |
| 102 | 102 |
</table> |
| 103 | 103 |
<p><input type="submit" value="'.$submit.'" /></p> |
| 104 |
-</p>')); |
|
| 104 |
+')); |
|
| 105 | 105 |
|
| 106 | 106 |
?> |
| ... | ... |
@@ -57,7 +57,7 @@ if (! $new ) |
| 57 | 57 |
|
| 58 | 58 |
$form = '<p><label for="handle">Bezeichnung:</label> <input type="text" name="handle" id="handle" value="'.$dyndns['handle'].'" onkeyup="updateUsernameHTTP()" /></p> |
| 59 | 59 |
|
| 60 |
-<h4>Update per HTTPs</strong></h4> |
|
| 60 |
+<h4>Update per HTTPs</h4> |
|
| 61 | 61 |
<p style="margin-left: 2em;">Geben Sie hier ein Passwort ein um das Update per HTTPs zu aktivieren.'.$http_update_info.'</p> |
| 62 | 62 |
<p style="margin-left: 2em;">Benutzername: <strong><span id="username_http">'.$username_http.'</span></strong></p> |
| 63 | 63 |
<p style="margin-left: 2em;"><label for="password_http">Passwort:</label> <input type="password" id="password_http" name="password_http" value="'.($dyndns['password'] ? '************' : '').'" /></p> |
| ... | ... |
@@ -66,7 +66,7 @@ $form = '<p><label for="handle">Bezeichnung:</label> <input type="text" nam |
| 66 | 66 |
<p style="margin-left: 2em;">Kopieren Sie Ihren SSH-public-Key im OpenSSH-Format in dieses Eingabefeld um das Update per SSH zu aktivieren.</p> |
| 67 | 67 |
<p style="margin-left: 2em; vertical-align: middle;"><label for="sshkey">SSH Public-Key:</label><br /><textarea style="height: 10em; width: 80%;" id="sshkey" name="sshkey">'.$dyndns['sshkey'].'</textarea></p> |
| 68 | 68 |
|
| 69 |
-<p style="margin-left: 2em;"><input type="submit" value="Speichern" /> |
|
| 69 |
+<p style="margin-left: 2em;"><input type="submit" value="Speichern" /></p> |
|
| 70 | 70 |
'; |
| 71 | 71 |
|
| 72 | 72 |
|
| ... | ... |
@@ -12,7 +12,7 @@ require_once('common.php');
|
| 12 | 12 |
function mailaccounts($uid) |
| 13 | 13 |
{
|
| 14 | 14 |
$uid = (int) $uid; |
| 15 |
- $result = db_query("SELECT m.id,concat_ws('@',`m`.`local`,if(isnull(`m`.`domain`),'{config('masterdomain')}',`d`.`domainname`)) AS `account`, `m`.`password` AS `cryptpass`,`m`.`maildir` AS `maildir`,aktiv from (`mail`.`mailaccounts` `m` left join `mail`.`v_domains` `d` on((`d`.`id` = `m`.`domain`))) WHERE m.uid=$uid");
|
|
| 15 |
+ $result = db_query("SELECT m.id,concat_ws('@',`m`.`local`,if(isnull(`m`.`domain`),'".config('masterdomain')."',`d`.`domainname`)) AS `account`, `m`.`password` AS `cryptpass`,`m`.`maildir` AS `maildir`,aktiv from (`mail`.`mailaccounts` `m` left join `mail`.`v_domains` `d` on((`d`.`id` = `m`.`domain`))) WHERE m.uid=$uid");
|
|
| 16 | 16 |
DEBUG("Found ".@mysql_num_rows($result)." rows!");
|
| 17 | 17 |
$accounts = array(); |
| 18 | 18 |
if (@mysql_num_rows($result) > 0) |
| ... | ... |
@@ -24,7 +24,7 @@ function mailaccounts($uid) |
| 24 | 24 |
function get_mailaccount($id) |
| 25 | 25 |
{
|
| 26 | 26 |
$uid = (int) $uid; |
| 27 |
- $result = db_query("SELECT concat_ws('@',`m`.`local`,if(isnull(`m`.`domain`),'{config('masterdomain')}',`d`.`domainname`)) AS `account`, `m`.`password` AS `cryptpass`,`m`.`maildir` AS `maildir`,aktiv from (`mail`.`mailaccounts` `m` left join `mail`.`v_domains` `d` on((`d`.`id` = `m`.`domain`))) WHERE m.id=$id");
|
|
| 27 |
+ $result = db_query("SELECT concat_ws('@',`m`.`local`,if(isnull(`m`.`domain`),'".config('masterdomain')."',`d`.`domainname`)) AS `account`, `m`.`password` AS `cryptpass`,`m`.`maildir` AS `maildir`,aktiv from (`mail`.`mailaccounts` `m` left join `mail`.`v_domains` `d` on((`d`.`id` = `m`.`domain`))) WHERE m.id=$id");
|
|
| 28 | 28 |
DEBUG("Found ".mysql_num_rows($result)." rows!");
|
| 29 | 29 |
$acc = mysql_fetch_object($result); |
| 30 | 30 |
$ret = array('account' => $acc->account, 'mailbox' => $acc->maildir, 'enabled' => ($acc->aktiv == 1));
|
| ... | ... |
@@ -148,7 +148,7 @@ function check_valid($acc) |
| 148 | 148 |
if ($acc['account'] == '' || strpos($acc['account'], '@') == 0) |
| 149 | 149 |
return "Es wurde kein Benutzername angegeben!"; |
| 150 | 150 |
if (strpos($acc['account'], '@') === false) |
| 151 |
- return "Es wurde kein Domain-Teil im Account-Name angegeben. Account-Namen müssen einen Domain-Teil enthalten. Im Zweifel versuchen Sie »@{config('masterdomain')}«.";
|
|
| 151 |
+ return "Es wurde kein Domain-Teil im Account-Name angegeben. Account-Namen müssen einen Domain-Teil enthalten. Im Zweifel versuchen Sie »@".config('masterdomain')."«.";
|
|
| 152 | 152 |
|
| 153 | 153 |
list($local, $domain) = explode('@', $acc['account'], 2);
|
| 154 | 154 |
verify_input_username($local); |
| ... | ... |
@@ -163,7 +163,7 @@ function check_valid($acc) |
| 163 | 163 |
{
|
| 164 | 164 |
if (substr($local, 0, strlen($user['username'])) != $user['username'] || ($acc['account'][strlen($user['username'])] != '-' && $acc['account'][strlen($user['username'])] != '@')) |
| 165 | 165 |
{
|
| 166 |
- return "Sie haben »@{config('masterdomain')}« als Domain-Teil angegeben, aber der Benutzer-Teil beginnt nicht mit Ihrem Benutzername!";
|
|
| 166 |
+ return "Sie haben »@".config('masterdomain')."« als Domain-Teil angegeben, aber der Benutzer-Teil beginnt nicht mit Ihrem Benutzername!";
|
|
| 167 | 167 |
} |
| 168 | 168 |
} |
| 169 | 169 |
else |
| ... | ... |
@@ -48,7 +48,7 @@ if ($certs != NULL) {
|
| 48 | 48 |
} |
| 49 | 49 |
else |
| 50 | 50 |
{
|
| 51 |
- output('<p><em>Bisher sind keine Zertifikate für Ihren Zugang eingerichtet</em>');
|
|
| 51 |
+ output('<p><em>Bisher sind keine Zertifikate für Ihren Zugang eingerichtet</em></p>');
|
|
| 52 | 52 |
} |
| 53 | 53 |
|
| 54 | 54 |
$backurl = 'go/index/cert'; |
| ... | ... |
@@ -51,7 +51,6 @@ if ($debugmode) |
| 51 | 51 |
|
| 52 | 52 |
html_header('<script type="text/javascript" src="'.$prefix.'js/ajax.js" ></script>
|
| 53 | 53 |
<script type="text/javascript"> |
| 54 |
-<!-- |
|
| 55 | 54 |
|
| 56 | 55 |
function doRequest() {
|
| 57 | 56 |
ajax_request(\'su_ajax\', \''.$debug.'q=\'+document.getElementById(\'query\').value, got_response) |
| ... | ... |
@@ -69,7 +68,6 @@ function got_response() {
|
| 69 | 68 |
} |
| 70 | 69 |
} |
| 71 | 70 |
|
| 72 |
-// --> |
|
| 73 | 71 |
</script> |
| 74 | 72 |
'); |
| 75 | 73 |
|
| ... | ... |
@@ -78,6 +76,7 @@ output(html_form('su_su_ajax', '', '', '<strong>Suchtext:</strong> <input type="
|
| 78 | 76 |
output('<div id="response"></div>
|
| 79 | 77 |
<div style="height: 3em;"> </div>'); |
| 80 | 78 |
|
| 79 |
+/* |
|
| 81 | 80 |
|
| 82 | 81 |
|
| 83 | 82 |
$users = list_system_users(); |
| ... | ... |
@@ -99,7 +98,7 @@ $customers = list_customers(); |
| 99 | 98 |
$options = ''; |
| 100 | 99 |
foreach ($customers as $customer) |
| 101 | 100 |
{
|
| 102 |
- $options .= " <option value=\"{$customer->id}\">{$customer->id} - {$customer->name}</option>\n";
|
|
| 101 |
+ $options .= " <option value=\"{$customer->id}\">{$customer->id} - ".htmlspecialchars($customer->name)."</option>\n";
|
|
| 103 | 102 |
} |
| 104 | 103 |
|
| 105 | 104 |
output(html_form('su_su', 'su', '', '<p>Kunde auswählen:
|
| ... | ... |
@@ -110,6 +109,6 @@ output(html_form('su_su', 'su', '', '<p>Kunde auswählen:
|
| 110 | 109 |
</p> |
| 111 | 110 |
')); |
| 112 | 111 |
|
| 113 |
- |
|
| 112 |
+*/ |
|
| 114 | 113 |
|
| 115 | 114 |
?> |
| ... | ... |
@@ -24,7 +24,7 @@ output('<h3>Überprüfung Ihrer Web-Anwendungen auf Sicherheitslücken</h3>');
|
| 24 | 24 |
|
| 25 | 25 |
output('<p>Das Programm freewvs prüft automatisch regelmäßig Ihre Web-Anwendungen (z.B. Blog-Software, Content-Management-Systeme, ...) auf bekannte Sicherheitsprobleme. Sie können festlegen, wie oft Sie bei gefundenen Problemen benachrichtigt werden möchten.</p>
|
| 26 | 26 |
<p><strong>Wie oft möchten Sie über Sicherheitsprobleme benachrichtigt werden?</strong></p> |
| 27 |
-'.html_form('freewvs_freq', '', '', '<p>'.html_select('freq', array('day' => 'täglich', 'week' => 'höchstens einmal pro Woche', 'month' => 'höchstens einmal pro Monat'), $freq).'   <input type="submit" value="speichern" />').'</p>');
|
|
| 27 |
+'.html_form('freewvs_freq', 'freewvs', '', '<p>'.html_select('freq', array('day' => 'täglich', 'week' => 'höchstens einmal pro Woche', 'month' => 'höchstens einmal pro Monat'), $freq).'   <input type="submit" value="speichern" /></p>'));
|
|
| 28 | 28 |
|
| 29 | 29 |
$results = load_results(); |
| 30 | 30 |
|
| 31 | 31 |