... | ... |
@@ -36,9 +36,9 @@ $freq = $result['freq']; |
36 | 36 |
|
37 | 37 |
headline('Überprüfung Ihrer Web-Anwendungen auf Sicherheitslücken'); |
38 | 38 |
|
39 |
-output('<p>Bei '.config('company_name').' werden die von Ihnen installierten Web-Anwendungen (z.B. Blog-Software, Content-Management-Systeme, ...) regelmäßig automatisch auf bekannte Sicherheitsprobleme untersucht. Sie erhalten jeweils umgehend eine Nachricht, wenn wir gefährdete Anwendungen finden. Zudem werden wir Sie regelmäßig an bestehende Sicherheitslücken erinnern.</p> |
|
39 |
+output('<p>Bei ' . config('company_name') . ' werden die von Ihnen installierten Web-Anwendungen (z.B. Blog-Software, Content-Management-Systeme, ...) regelmäßig automatisch auf bekannte Sicherheitsprobleme untersucht. Sie erhalten jeweils umgehend eine Nachricht, wenn wir gefährdete Anwendungen finden. Zudem werden wir Sie regelmäßig an bestehende Sicherheitslücken erinnern.</p> |
|
40 | 40 |
<p><strong>Wie häufig möchten Sie an bestehende Sicherheitsprobleme erinnert werden?</strong></p> |
41 |
-'.html_form('freewvs_freq', 'freewvs', '', '<p>'.html_select('freq', ['day' => 'täglich', 'week' => 'einmal pro Woche', 'month' => 'einmal pro Monat'], $freq).'   <input type="submit" value="speichern" /></p>')); |
|
41 |
+' . html_form('freewvs_freq', 'freewvs', '', '<p>' . html_select('freq', ['day' => 'täglich', 'week' => 'einmal pro Woche', 'month' => 'einmal pro Monat'], $freq) . '   <input type="submit" value="speichern" /></p>')); |
|
42 | 42 |
|
43 | 43 |
$results = load_results(); |
44 | 44 |
|
... | ... |
@@ -50,17 +50,17 @@ foreach ($results as $app) { |
50 | 50 |
if ($app['state'] == 'ok') { |
51 | 51 |
output("<img src='{$prefix}images/ok.png' />\n"); |
52 | 52 |
output("<p><strong>{$app['appname']} {$app['version']}</strong></p>\n"); |
53 |
- output("<p>Gefunden in ".filter_output_html($app['directory'])." (<a href=\"{$url}\">{$url}</a>)</p>\n"); |
|
53 |
+ output("<p>Gefunden in " . filter_output_html($app['directory']) . " (<a href=\"{$url}\">{$url}</a>)</p>\n"); |
|
54 | 54 |
output("<p>Diese Anwendung hat keine allgemein bekannten Sicherheitsprobleme.</p>\n"); |
55 | 55 |
} else { |
56 | 56 |
$vulnlink = $app['vulninfo']; |
57 | 57 |
$doclink = get_upgradeinstructions($app['appname']); |
58 | 58 |
if (substr($vulnlink, 0, 3) == 'CVE') { |
59 |
- $vulnlink = 'https://cve.mitre.org/cgi-bin/cvename.cgi?name='.$vulnlink; |
|
59 |
+ $vulnlink = 'https://cve.mitre.org/cgi-bin/cvename.cgi?name=' . $vulnlink; |
|
60 | 60 |
} |
61 | 61 |
output("<img src='{$prefix}images/error.png' />\n"); |
62 | 62 |
output("<p><strong>{$app['appname']} {$app['version']}</strong></p>\n"); |
63 |
- output("<p>Gefunden in ".filter_output_html($app['directory'])." (<a href=\"{$url}\">{$url}</a>)</p>\n"); |
|
63 |
+ output("<p>Gefunden in " . filter_output_html($app['directory']) . " (<a href=\"{$url}\">{$url}</a>)</p>\n"); |
|
64 | 64 |
if ($app['safeversion'] != '') { |
65 | 65 |
output("<p>Diese Anwendung ist von Sicherheits-Problemen betroffen. Ein <strong>Update auf Version {$app['safeversion']}</strong> wird dringend empfohlen. Prüfen Sie anhand der unten genannten Referenz welche Gefahren von dieser Anwendung momentan ausgehen.</p>\n"); |
66 | 66 |
} else { |
... | ... |
@@ -68,14 +68,14 @@ foreach ($results as $app) { |
68 | 68 |
} |
69 | 69 |
output("<p><strong>Referenz zu diesem Sicherheitsproblem: <a href='{$vulnlink}'>{$app['vulninfo']}</a></strong></p>"); |
70 | 70 |
if ($doclink != null) { |
71 |
- output('<p><strong>Hinweis:</strong> Um Ihnen das Upgrade leichter zu machen, möchten wir Sie auf eine <a href="'.$doclink.'">deutschsprachige Upgrade-Anleitung</a> aufmerksam machen.</p>'."\n"); |
|
71 |
+ output('<p><strong>Hinweis:</strong> Um Ihnen das Upgrade leichter zu machen, möchten wir Sie auf eine <a href="' . $doclink . '">deutschsprachige Upgrade-Anleitung</a> aufmerksam machen.</p>' . "\n"); |
|
72 | 72 |
} |
73 | 73 |
$up = upgradeable($app['appname'], $app['version']); |
74 | 74 |
if ($up) { |
75 | 75 |
if (directory_in_use($app['directory'])) { |
76 | 76 |
output('<p><em>Automatische Update-Aktion heute nicht mehr möglich</em></p>'); |
77 | 77 |
} else { |
78 |
- output('<p>'.internal_link('requestupdate', 'Update automatisch durchführen', "dir={$app['directory']}&app={$up}")."</p>\n"); |
|
78 |
+ output('<p>' . internal_link('requestupdate', 'Update automatisch durchführen', "dir={$app['directory']}&app={$up}") . "</p>\n"); |
|
79 | 79 |
} |
80 | 80 |
} |
81 | 81 |
} |
... | ... |
@@ -31,8 +31,8 @@ if (isset($_POST['freq']) && in_array($_POST['freq'], ["day","week","month"])) { |
31 | 31 |
} |
32 | 32 |
|
33 | 33 |
$result = db_query("SELECT freq FROM qatools.v_freewvs WHERE uid=?", [$uid]); |
34 |
-$result=$result->fetch(); |
|
35 |
-$freq=$result['freq']; |
|
34 |
+$result = $result->fetch(); |
|
35 |
+$freq = $result['freq']; |
|
36 | 36 |
|
37 | 37 |
headline('Überprüfung Ihrer Web-Anwendungen auf Sicherheitslücken'); |
38 | 38 |
|
... | ... |
@@ -2,14 +2,11 @@ |
2 | 2 |
/* |
3 | 3 |
This file belongs to the Webinterface of schokokeks.org Hosting |
4 | 4 |
|
5 |
-Written 2008-2018 by schokokeks.org Hosting, namely |
|
5 |
+Written by schokokeks.org Hosting, namely |
|
6 | 6 |
Bernd Wurst <bernd@schokokeks.org> |
7 | 7 |
Hanno Böck <hanno@schokokeks.org> |
8 | 8 |
|
9 |
-To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. |
|
10 |
- |
|
11 |
-You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see |
|
12 |
-http://creativecommons.org/publicdomain/zero/1.0/ |
|
9 |
+This code is published under a 0BSD license. |
|
13 | 10 |
|
14 | 11 |
Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code. |
15 | 12 |
*/ |
... | ... |
@@ -19,21 +19,21 @@ require_once('session/start.php'); |
19 | 19 |
require_once('freewvs.php'); |
20 | 20 |
require_once('webapp-installer.php'); |
21 | 21 |
|
22 |
-require_role(array(ROLE_SYSTEMUSER)); |
|
22 |
+require_role([ROLE_SYSTEMUSER]); |
|
23 | 23 |
|
24 | 24 |
title("Prüfung Ihrer Web-Anwendungen"); |
25 | 25 |
|
26 | 26 |
$uid = (int) $_SESSION['userinfo']['uid']; |
27 | 27 |
|
28 |
-if (isset($_POST['freq']) && in_array($_POST['freq'], array("day","week","month"))) { |
|
28 |
+if (isset($_POST['freq']) && in_array($_POST['freq'], ["day","week","month"])) { |
|
29 | 29 |
check_form_token('freewvs_freq'); |
30 |
- $args = array(":uid" => $uid, ":freq" => $_POST['freq']); |
|
30 |
+ $args = [":uid" => $uid, ":freq" => $_POST['freq']]; |
|
31 | 31 |
db_query("REPLACE INTO qatools.freewvs (user,freq) VALUES (:uid,:freq)", $args); |
32 | 32 |
header("Location: freewvs"); |
33 | 33 |
die(); |
34 | 34 |
} |
35 | 35 |
|
36 |
-$result = db_query("SELECT freq FROM qatools.v_freewvs WHERE uid=?", array($uid)); |
|
36 |
+$result = db_query("SELECT freq FROM qatools.v_freewvs WHERE uid=?", [$uid]); |
|
37 | 37 |
$result=$result->fetch(); |
38 | 38 |
$freq=$result['freq']; |
39 | 39 |
|
... | ... |
@@ -41,7 +41,7 @@ headline('Überprüfung Ihrer Web-Anwendungen auf Sicherheitslücken'); |
41 | 41 |
|
42 | 42 |
output('<p>Bei '.config('company_name').' werden die von Ihnen installierten Web-Anwendungen (z.B. Blog-Software, Content-Management-Systeme, ...) regelmäßig automatisch auf bekannte Sicherheitsprobleme untersucht. Sie erhalten jeweils umgehend eine Nachricht, wenn wir gefährdete Anwendungen finden. Zudem werden wir Sie regelmäßig an bestehende Sicherheitslücken erinnern.</p> |
43 | 43 |
<p><strong>Wie häufig möchten Sie an bestehende Sicherheitsprobleme erinnert werden?</strong></p> |
44 |
-'.html_form('freewvs_freq', 'freewvs', '', '<p>'.html_select('freq', array('day' => 'täglich', 'week' => 'einmal pro Woche', 'month' => 'einmal pro Monat'), $freq).'   <input type="submit" value="speichern" /></p>')); |
|
44 |
+'.html_form('freewvs_freq', 'freewvs', '', '<p>'.html_select('freq', ['day' => 'täglich', 'week' => 'einmal pro Woche', 'month' => 'einmal pro Monat'], $freq).'   <input type="submit" value="speichern" /></p>')); |
|
45 | 45 |
|
46 | 46 |
$results = load_results(); |
47 | 47 |
|
... | ... |
@@ -53,7 +53,7 @@ foreach ($results as $app) { |
53 | 53 |
if ($app['state'] == 'ok') { |
54 | 54 |
output("<img src='{$prefix}images/ok.png' />\n"); |
55 | 55 |
output("<p><strong>{$app['appname']} {$app['version']}</strong></p>\n"); |
56 |
- output("<p>Gefunden in {$app['directory']} (<a href=\"{$url}\">{$url}</a>)</p>\n"); |
|
56 |
+ output("<p>Gefunden in ".filter_output_html($app['directory'])." (<a href=\"{$url}\">{$url}</a>)</p>\n"); |
|
57 | 57 |
output("<p>Diese Anwendung hat keine allgemein bekannten Sicherheitsprobleme.</p>\n"); |
58 | 58 |
} else { |
59 | 59 |
$vulnlink = $app['vulninfo']; |
... | ... |
@@ -63,7 +63,7 @@ foreach ($results as $app) { |
63 | 63 |
} |
64 | 64 |
output("<img src='{$prefix}images/error.png' />\n"); |
65 | 65 |
output("<p><strong>{$app['appname']} {$app['version']}</strong></p>\n"); |
66 |
- output("<p>Gefunden in {$app['directory']} (<a href=\"{$url}\">{$url}</a>)</p>\n"); |
|
66 |
+ output("<p>Gefunden in ".filter_output_html($app['directory'])." (<a href=\"{$url}\">{$url}</a>)</p>\n"); |
|
67 | 67 |
if ($app['safeversion'] != '') { |
68 | 68 |
output("<p>Diese Anwendung ist von Sicherheits-Problemen betroffen. Ein <strong>Update auf Version {$app['safeversion']}</strong> wird dringend empfohlen. Prüfen Sie anhand der unten genannten Referenz welche Gefahren von dieser Anwendung momentan ausgehen.</p>\n"); |
69 | 69 |
} else { |
... | ... |
@@ -8,7 +8,7 @@ Written 2008-2018 by schokokeks.org Hosting, namely |
8 | 8 |
|
9 | 9 |
To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. |
10 | 10 |
|
11 |
-You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see |
|
11 |
+You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see |
|
12 | 12 |
http://creativecommons.org/publicdomain/zero/1.0/ |
13 | 13 |
|
14 | 14 |
Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code. |
... | ... |
@@ -25,12 +25,12 @@ title("Prüfung Ihrer Web-Anwendungen"); |
25 | 25 |
|
26 | 26 |
$uid = (int) $_SESSION['userinfo']['uid']; |
27 | 27 |
|
28 |
-if (isset($_POST['freq']) && in_array($_POST['freq'],array("day","week","month"))) { |
|
29 |
- check_form_token('freewvs_freq'); |
|
30 |
- $args = array(":uid" => $uid, ":freq" => $_POST['freq']); |
|
31 |
- db_query("REPLACE INTO qatools.freewvs (user,freq) VALUES (:uid,:freq)", $args); |
|
32 |
- header("Location: freewvs"); |
|
33 |
- die(); |
|
28 |
+if (isset($_POST['freq']) && in_array($_POST['freq'], array("day","week","month"))) { |
|
29 |
+ check_form_token('freewvs_freq'); |
|
30 |
+ $args = array(":uid" => $uid, ":freq" => $_POST['freq']); |
|
31 |
+ db_query("REPLACE INTO qatools.freewvs (user,freq) VALUES (:uid,:freq)", $args); |
|
32 |
+ header("Location: freewvs"); |
|
33 |
+ die(); |
|
34 | 34 |
} |
35 | 35 |
|
36 | 36 |
$result = db_query("SELECT freq FROM qatools.v_freewvs WHERE uid=?", array($uid)); |
... | ... |
@@ -47,43 +47,42 @@ $results = load_results(); |
47 | 47 |
|
48 | 48 |
output('<h3>Aktuell installierte Web-Anwendungen</h3> |
49 | 49 |
<p>Die folgenden Web-Anwendungen wurden beim letzten Programmdurchlauf gefunden. Diese Liste wird i.d.R. täglich aktualisiert.</p>'); |
50 |
-foreach ($results AS $app) { |
|
51 |
- $url = get_url_for_dir($app['directory']); |
|
52 |
- output("<div class='freewvs freewvs-{$app['state']}'>\n"); |
|
53 |
- if ($app['state'] == 'ok') { |
|
54 |
- output("<img src='{$prefix}images/ok.png' />\n"); |
|
55 |
- output("<p><strong>{$app['appname']} {$app['version']}</strong></p>\n"); |
|
56 |
- output("<p>Gefunden in {$app['directory']} (<a href=\"{$url}\">{$url}</a>)</p>\n"); |
|
57 |
- output("<p>Diese Anwendung hat keine allgemein bekannten Sicherheitsprobleme.</p>\n"); |
|
58 |
- } |
|
59 |
- else { |
|
60 |
- $vulnlink = $app['vulninfo']; |
|
61 |
- $doclink = get_upgradeinstructions($app['appname']); |
|
62 |
- if (substr($vulnlink, 0, 3) == 'CVE') { |
|
63 |
- $vulnlink = 'https://cve.mitre.org/cgi-bin/cvename.cgi?name='.$vulnlink; |
|
64 |
- } |
|
65 |
- output("<img src='{$prefix}images/error.png' />\n"); |
|
66 |
- output("<p><strong>{$app['appname']} {$app['version']}</strong></p>\n"); |
|
67 |
- output("<p>Gefunden in {$app['directory']} (<a href=\"{$url}\">{$url}</a>)</p>\n"); |
|
68 |
- if ($app['safeversion'] != '') { |
|
69 |
- output("<p>Diese Anwendung ist von Sicherheits-Problemen betroffen. Ein <strong>Update auf Version {$app['safeversion']}</strong> wird dringend empfohlen. Prüfen Sie anhand der unten genannten Referenz welche Gefahren von dieser Anwendung momentan ausgehen.</p>\n"); |
|
50 |
+foreach ($results as $app) { |
|
51 |
+ $url = get_url_for_dir($app['directory']); |
|
52 |
+ output("<div class='freewvs freewvs-{$app['state']}'>\n"); |
|
53 |
+ if ($app['state'] == 'ok') { |
|
54 |
+ output("<img src='{$prefix}images/ok.png' />\n"); |
|
55 |
+ output("<p><strong>{$app['appname']} {$app['version']}</strong></p>\n"); |
|
56 |
+ output("<p>Gefunden in {$app['directory']} (<a href=\"{$url}\">{$url}</a>)</p>\n"); |
|
57 |
+ output("<p>Diese Anwendung hat keine allgemein bekannten Sicherheitsprobleme.</p>\n"); |
|
70 | 58 |
} else { |
71 |
- output("<p>Diese Anwendung ist von Sicherheits-Problemen betroffen. Leider gibt es <strong>momentan keine aktualisierte Version</strong>. Prüfen Sie bitte anhand der unten genannten Beschreibung des Problem die möglichen Gefahren eines weiteren Betriebs dieser Anwendung.</p>\n"); |
|
72 |
- } |
|
73 |
- output("<p><strong>Referenz zu diesem Sicherheitsproblem: <a href='{$vulnlink}'>{$app['vulninfo']}</a></strong></p>"); |
|
74 |
- if ($doclink != NULL) |
|
75 |
- output('<p><strong>Hinweis:</strong> Um Ihnen das Upgrade leichter zu machen, möchten wir Sie auf eine <a href="'.$doclink.'">deutschsprachige Upgrade-Anleitung</a> aufmerksam machen.</p>'."\n"); |
|
76 |
- $up = upgradeable($app['appname'], $app['version']); |
|
77 |
- if ($up) |
|
78 |
- { |
|
79 |
- if (directory_in_use($app['directory'])) |
|
80 |
- output('<p><em>Automatische Update-Aktion heute nicht mehr möglich</em></p>'); |
|
81 |
- else |
|
82 |
- output('<p>'.internal_link('requestupdate', 'Update automatisch durchführen', "dir={$app['directory']}&app={$up}")."</p>\n"); |
|
59 |
+ $vulnlink = $app['vulninfo']; |
|
60 |
+ $doclink = get_upgradeinstructions($app['appname']); |
|
61 |
+ if (substr($vulnlink, 0, 3) == 'CVE') { |
|
62 |
+ $vulnlink = 'https://cve.mitre.org/cgi-bin/cvename.cgi?name='.$vulnlink; |
|
63 |
+ } |
|
64 |
+ output("<img src='{$prefix}images/error.png' />\n"); |
|
65 |
+ output("<p><strong>{$app['appname']} {$app['version']}</strong></p>\n"); |
|
66 |
+ output("<p>Gefunden in {$app['directory']} (<a href=\"{$url}\">{$url}</a>)</p>\n"); |
|
67 |
+ if ($app['safeversion'] != '') { |
|
68 |
+ output("<p>Diese Anwendung ist von Sicherheits-Problemen betroffen. Ein <strong>Update auf Version {$app['safeversion']}</strong> wird dringend empfohlen. Prüfen Sie anhand der unten genannten Referenz welche Gefahren von dieser Anwendung momentan ausgehen.</p>\n"); |
|
69 |
+ } else { |
|
70 |
+ output("<p>Diese Anwendung ist von Sicherheits-Problemen betroffen. Leider gibt es <strong>momentan keine aktualisierte Version</strong>. Prüfen Sie bitte anhand der unten genannten Beschreibung des Problem die möglichen Gefahren eines weiteren Betriebs dieser Anwendung.</p>\n"); |
|
71 |
+ } |
|
72 |
+ output("<p><strong>Referenz zu diesem Sicherheitsproblem: <a href='{$vulnlink}'>{$app['vulninfo']}</a></strong></p>"); |
|
73 |
+ if ($doclink != null) { |
|
74 |
+ output('<p><strong>Hinweis:</strong> Um Ihnen das Upgrade leichter zu machen, möchten wir Sie auf eine <a href="'.$doclink.'">deutschsprachige Upgrade-Anleitung</a> aufmerksam machen.</p>'."\n"); |
|
75 |
+ } |
|
76 |
+ $up = upgradeable($app['appname'], $app['version']); |
|
77 |
+ if ($up) { |
|
78 |
+ if (directory_in_use($app['directory'])) { |
|
79 |
+ output('<p><em>Automatische Update-Aktion heute nicht mehr möglich</em></p>'); |
|
80 |
+ } else { |
|
81 |
+ output('<p>'.internal_link('requestupdate', 'Update automatisch durchführen', "dir={$app['directory']}&app={$up}")."</p>\n"); |
|
82 |
+ } |
|
83 |
+ } |
|
83 | 84 |
} |
84 |
- } |
|
85 |
- output("</div>\n"); |
|
86 |
- #output("<tr><td>{$app['appname']} ({$app['version']})</td><td>{$app['state']}</td></tr>"); |
|
85 |
+ output("</div>\n"); |
|
86 |
+ #output("<tr><td>{$app['appname']} ({$app['version']})</td><td>{$app['state']}</td></tr>"); |
|
87 | 87 |
} |
88 | 88 |
#output('</table>'); |
89 |
- |
... | ... |
@@ -60,7 +60,7 @@ foreach ($results AS $app) { |
60 | 60 |
$vulnlink = $app['vulninfo']; |
61 | 61 |
$doclink = get_upgradeinstructions($app['appname']); |
62 | 62 |
if (substr($vulnlink, 0, 3) == 'CVE') { |
63 |
- $vulnlink = 'http://cve.mitre.org/cgi-bin/cvename.cgi?name='.$vulnlink; |
|
63 |
+ $vulnlink = 'https://cve.mitre.org/cgi-bin/cvename.cgi?name='.$vulnlink; |
|
64 | 64 |
} |
65 | 65 |
output("<img src='{$prefix}images/error.png' />\n"); |
66 | 66 |
output("<p><strong>{$app['appname']} {$app['version']}</strong></p>\n"); |
... | ... |
@@ -39,9 +39,9 @@ $freq=$result['freq']; |
39 | 39 |
|
40 | 40 |
headline('Überprüfung Ihrer Web-Anwendungen auf Sicherheitslücken'); |
41 | 41 |
|
42 |
-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> |
|
43 |
-<p><strong>Wie oft möchten Sie über Sicherheitsprobleme benachrichtigt werden?</strong></p> |
|
44 |
-'.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>')); |
|
42 |
+output('<p>Bei '.config('company_name').' werden die von Ihnen installierten Web-Anwendungen (z.B. Blog-Software, Content-Management-Systeme, ...) regelmäßig automatisch auf bekannte Sicherheitsprobleme untersucht. Sie erhalten jeweils umgehend eine Nachricht, wenn wir gefährdete Anwendungen finden. Zudem werden wir Sie regelmäßig an bestehende Sicherheitslücken erinnern.</p> |
|
43 |
+<p><strong>Wie häufig möchten Sie an bestehende Sicherheitsprobleme erinnert werden?</strong></p> |
|
44 |
+'.html_form('freewvs_freq', 'freewvs', '', '<p>'.html_select('freq', array('day' => 'täglich', 'week' => 'einmal pro Woche', 'month' => 'einmal pro Monat'), $freq).'   <input type="submit" value="speichern" /></p>')); |
|
45 | 45 |
|
46 | 46 |
$results = load_results(); |
47 | 47 |
|
... | ... |
@@ -27,12 +27,13 @@ $uid = (int) $_SESSION['userinfo']['uid']; |
27 | 27 |
|
28 | 28 |
if (isset($_POST['freq']) && in_array($_POST['freq'],array("day","week","month"))) { |
29 | 29 |
check_form_token('freewvs_freq'); |
30 |
- db_query("REPLACE INTO qatools.freewvs (user,freq) VALUES ({$uid},'{$_POST['freq']}');"); |
|
30 |
+ $args = array(":uid" => $uid, ":freq" => $_POST['freq']); |
|
31 |
+ db_query("REPLACE INTO qatools.freewvs (user,freq) VALUES (:uid,:freq)", $args); |
|
31 | 32 |
header("Location: freewvs"); |
32 | 33 |
die(); |
33 | 34 |
} |
34 | 35 |
|
35 |
-$result = db_query("SELECT freq FROM qatools.v_freewvs WHERE uid={$uid};"); |
|
36 |
+$result = db_query("SELECT freq FROM qatools.v_freewvs WHERE uid=?", array($uid)); |
|
36 | 37 |
$result=$result->fetch(); |
37 | 38 |
$freq=$result['freq']; |
38 | 39 |
|
... | ... |
@@ -33,7 +33,7 @@ if (isset($_POST['freq']) && in_array($_POST['freq'],array("day","week","month") |
33 | 33 |
} |
34 | 34 |
|
35 | 35 |
$result = db_query("SELECT freq FROM qatools.v_freewvs WHERE uid={$uid};"); |
36 |
-$result=mysql_fetch_assoc($result); |
|
36 |
+$result=$result->fetch(); |
|
37 | 37 |
$freq=$result['freq']; |
38 | 38 |
|
39 | 39 |
headline('Überprüfung Ihrer Web-Anwendungen auf Sicherheitslücken'); |
... | ... |
@@ -1,4 +1,18 @@ |
1 | 1 |
<?php |
2 |
+/* |
|
3 |
+This file belongs to the Webinterface of schokokeks.org Hosting |
|
4 |
+ |
|
5 |
+Written 2008-2012 by schokokeks.org Hosting, namely |
|
6 |
+ Bernd Wurst <bernd@schokokeks.org> |
|
7 |
+ Hanno Böck <hanno@schokokeks.org> |
|
8 |
+ |
|
9 |
+To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. |
|
10 |
+ |
|
11 |
+You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see |
|
12 |
+http://creativecommons.org/publicdomain/zero/1.0/ |
|
13 |
+ |
|
14 |
+Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code. |
|
15 |
+*/ |
|
2 | 16 |
|
3 | 17 |
require_once('session/start.php'); |
4 | 18 |
|
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1812 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -7,6 +7,8 @@ require_once('webapp-installer.php'); |
7 | 7 |
|
8 | 8 |
require_role(array(ROLE_SYSTEMUSER)); |
9 | 9 |
|
10 |
+title("Prüfung Ihrer Web-Anwendungen"); |
|
11 |
+ |
|
10 | 12 |
$uid = (int) $_SESSION['userinfo']['uid']; |
11 | 13 |
|
12 | 14 |
if (isset($_POST['freq']) && in_array($_POST['freq'],array("day","week","month"))) { |
... | ... |
@@ -20,7 +22,7 @@ $result = db_query("SELECT freq FROM qatools.v_freewvs WHERE uid={$uid};"); |
20 | 22 |
$result=mysql_fetch_assoc($result); |
21 | 23 |
$freq=$result['freq']; |
22 | 24 |
|
23 |
-output('<h3>Überprüfung Ihrer Web-Anwendungen auf Sicherheitslücken</h3>'); |
|
25 |
+headline('Überprüfung Ihrer Web-Anwendungen auf Sicherheitslücken'); |
|
24 | 26 |
|
25 | 27 |
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 | 28 |
<p><strong>Wie oft möchten Sie über Sicherheitsprobleme benachrichtigt werden?</strong></p> |
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1767 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -37,7 +37,7 @@ foreach ($results AS $app) { |
37 | 37 |
output("<img src='{$prefix}images/ok.png' />\n"); |
38 | 38 |
output("<p><strong>{$app['appname']} {$app['version']}</strong></p>\n"); |
39 | 39 |
output("<p>Gefunden in {$app['directory']} (<a href=\"{$url}\">{$url}</a>)</p>\n"); |
40 |
- output("<p>Diese Anwendung ist aktuell und hat keine allgemein bekannten Sicherheitsprobleme.</p>\n"); |
|
40 |
+ output("<p>Diese Anwendung hat keine allgemein bekannten Sicherheitsprobleme.</p>\n"); |
|
41 | 41 |
} |
42 | 42 |
else { |
43 | 43 |
$vulnlink = $app['vulninfo']; |
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1445 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -9,7 +9,7 @@ require_role(array(ROLE_SYSTEMUSER)); |
9 | 9 |
|
10 | 10 |
$uid = (int) $_SESSION['userinfo']['uid']; |
11 | 11 |
|
12 |
-if (in_array($_POST['freq'],array("day","week","month"))) { |
|
12 |
+if (isset($_POST['freq']) && in_array($_POST['freq'],array("day","week","month"))) { |
|
13 | 13 |
check_form_token('freewvs_freq'); |
14 | 14 |
db_query("REPLACE INTO qatools.freewvs (user,freq) VALUES ({$uid},'{$_POST['freq']}');"); |
15 | 15 |
header("Location: freewvs"); |
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1414 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -59,7 +59,10 @@ foreach ($results AS $app) { |
59 | 59 |
$up = upgradeable($app['appname'], $app['version']); |
60 | 60 |
if ($up) |
61 | 61 |
{ |
62 |
- output('<p>'.internal_link('requestupdate', 'Update automatisch durchführen', "dir={$app['directory']}&app={$up}")."</p>\n"); |
|
62 |
+ if (directory_in_use($app['directory'])) |
|
63 |
+ output('<p><em>Automatische Update-Aktion heute nicht mehr möglich</em></p>'); |
|
64 |
+ else |
|
65 |
+ output('<p>'.internal_link('requestupdate', 'Update automatisch durchführen', "dir={$app['directory']}&app={$up}")."</p>\n"); |
|
63 | 66 |
} |
64 | 67 |
} |
65 | 68 |
output("</div>\n"); |
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1377 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -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 |
|
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1301 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -3,6 +3,7 @@ |
3 | 3 |
require_once('session/start.php'); |
4 | 4 |
|
5 | 5 |
require_once('freewvs.php'); |
6 |
+require_once('webapp-installer.php'); |
|
6 | 7 |
|
7 | 8 |
require_role(array(ROLE_SYSTEMUSER)); |
8 | 9 |
|
... | ... |
@@ -30,11 +31,12 @@ $results = load_results(); |
30 | 31 |
output('<h3>Aktuell installierte Web-Anwendungen</h3> |
31 | 32 |
<p>Die folgenden Web-Anwendungen wurden beim letzten Programmdurchlauf gefunden. Diese Liste wird i.d.R. täglich aktualisiert.</p>'); |
32 | 33 |
foreach ($results AS $app) { |
34 |
+ $url = get_url_for_dir($app['directory']); |
|
33 | 35 |
output("<div class='freewvs freewvs-{$app['state']}'>\n"); |
34 | 36 |
if ($app['state'] == 'ok') { |
35 | 37 |
output("<img src='{$prefix}images/ok.png' />\n"); |
36 | 38 |
output("<p><strong>{$app['appname']} {$app['version']}</strong></p>\n"); |
37 |
- output("<p>Gefunden in {$app['directory']}</p>\n"); |
|
39 |
+ output("<p>Gefunden in {$app['directory']} (<a href=\"{$url}\">{$url}</a>)</p>\n"); |
|
38 | 40 |
output("<p>Diese Anwendung ist aktuell und hat keine allgemein bekannten Sicherheitsprobleme.</p>\n"); |
39 | 41 |
} |
40 | 42 |
else { |
... | ... |
@@ -45,7 +47,7 @@ foreach ($results AS $app) { |
45 | 47 |
} |
46 | 48 |
output("<img src='{$prefix}images/error.png' />\n"); |
47 | 49 |
output("<p><strong>{$app['appname']} {$app['version']}</strong></p>\n"); |
48 |
- output("<p>Gefunden in {$app['directory']}</p>\n"); |
|
50 |
+ output("<p>Gefunden in {$app['directory']} (<a href=\"{$url}\">{$url}</a>)</p>\n"); |
|
49 | 51 |
if ($app['safeversion'] != '') { |
50 | 52 |
output("<p>Diese Anwendung ist von Sicherheits-Problemen betroffen. Ein <strong>Update auf Version {$app['safeversion']}</strong> wird dringend empfohlen. Prüfen Sie anhand der unten genannten Referenz welche Gefahren von dieser Anwendung momentan ausgehen.</p>\n"); |
51 | 53 |
} else { |
... | ... |
@@ -53,7 +55,12 @@ foreach ($results AS $app) { |
53 | 55 |
} |
54 | 56 |
output("<p><strong>Referenz zu diesem Sicherheitsproblem: <a href='{$vulnlink}'>{$app['vulninfo']}</a></strong></p>"); |
55 | 57 |
if ($doclink != NULL) |
56 |
- output('<p><strong>Hinweis:</strong> Um Ihnen das Upgrade leichter zu machen, möchten wir Sie auf eine <a href="'.$doclink.'">deutschsprachige Upgrade-Anleitung</a> aufmerksam machen.</p>'); |
|
58 |
+ output('<p><strong>Hinweis:</strong> Um Ihnen das Upgrade leichter zu machen, möchten wir Sie auf eine <a href="'.$doclink.'">deutschsprachige Upgrade-Anleitung</a> aufmerksam machen.</p>'."\n"); |
|
59 |
+ $up = upgradeable($app['appname'], $app['version']); |
|
60 |
+ if ($up) |
|
61 |
+ { |
|
62 |
+ output('<p>'.internal_link('requestupdate', 'Update automatisch durchführen', "dir={$app['directory']}&app={$up}")."</p>\n"); |
|
63 |
+ } |
|
57 | 64 |
} |
58 | 65 |
output("</div>\n"); |
59 | 66 |
#output("<tr><td>{$app['appname']} ({$app['version']})</td><td>{$app['state']}</td></tr>"); |
... | ... |
@@ -34,8 +34,8 @@ foreach ($results AS $app) { |
34 | 34 |
if ($app['state'] == 'ok') { |
35 | 35 |
output("<img src='{$prefix}images/ok.png' />\n"); |
36 | 36 |
output("<p><strong>{$app['appname']} {$app['version']}</strong></p>\n"); |
37 |
- output("<p>Diese Anwendung ist aktuell und hat keine allgemein bekannten Sicherheitsprobleme.</p>\n"); |
|
38 | 37 |
output("<p>Gefunden in {$app['directory']}</p>\n"); |
38 |
+ output("<p>Diese Anwendung ist aktuell und hat keine allgemein bekannten Sicherheitsprobleme.</p>\n"); |
|
39 | 39 |
} |
40 | 40 |
else { |
41 | 41 |
$vulnlink = $app['vulninfo']; |
... | ... |
@@ -45,13 +45,13 @@ foreach ($results AS $app) { |
45 | 45 |
} |
46 | 46 |
output("<img src='{$prefix}images/error.png' />\n"); |
47 | 47 |
output("<p><strong>{$app['appname']} {$app['version']}</strong></p>\n"); |
48 |
+ output("<p>Gefunden in {$app['directory']}</p>\n"); |
|
48 | 49 |
if ($app['safeversion'] != '') { |
49 | 50 |
output("<p>Diese Anwendung ist von Sicherheits-Problemen betroffen. Ein <strong>Update auf Version {$app['safeversion']}</strong> wird dringend empfohlen. Prüfen Sie anhand der unten genannten Referenz welche Gefahren von dieser Anwendung momentan ausgehen.</p>\n"); |
50 | 51 |
} else { |
51 | 52 |
output("<p>Diese Anwendung ist von Sicherheits-Problemen betroffen. Leider gibt es <strong>momentan keine aktualisierte Version</strong>. Prüfen Sie bitte anhand der unten genannten Beschreibung des Problem die möglichen Gefahren eines weiteren Betriebs dieser Anwendung.</p>\n"); |
52 | 53 |
} |
53 | 54 |
output("<p><strong>Referenz zu diesem Sicherheitsproblem: <a href='{$vulnlink}'>{$app['vulninfo']}</a></strong></p>"); |
54 |
- output("<p>Gefunden in {$app['directory']}</p>\n"); |
|
55 | 55 |
if ($doclink != NULL) |
56 | 56 |
output('<p><strong>Hinweis:</strong> Um Ihnen das Upgrade leichter zu machen, möchten wir Sie auf eine <a href="'.$doclink.'">deutschsprachige Upgrade-Anleitung</a> aufmerksam machen.</p>'); |
57 | 57 |
} |
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1270 87cf0b9e-d624-0410-a070-f6ee81989793
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,62 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+require_once('session/start.php'); |
|
4 |
+ |
|
5 |
+require_once('freewvs.php'); |
|
6 |
+ |
|
7 |
+require_role(array(ROLE_SYSTEMUSER)); |
|
8 |
+ |
|
9 |
+$uid = (int) $_SESSION['userinfo']['uid']; |
|
10 |
+ |
|
11 |
+if (in_array($_POST['freq'],array("day","week","month"))) { |
|
12 |
+ check_form_token('freewvs_freq'); |
|
13 |
+ db_query("REPLACE INTO qatools.freewvs (user,freq) VALUES ({$uid},'{$_POST['freq']}');"); |
|
14 |
+ header("Location: freewvs"); |
|
15 |
+ die(); |
|
16 |
+} |
|
17 |
+ |
|
18 |
+$result = db_query("SELECT freq FROM qatools.v_freewvs WHERE uid={$uid};"); |
|
19 |
+$result=mysql_fetch_assoc($result); |
|
20 |
+$freq=$result['freq']; |
|
21 |
+ |
|
22 |
+output('<h3>Überprüfung Ihrer Web-Anwendungen auf Sicherheitslücken</h3>'); |
|
23 |
+ |
|
24 |
+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> |
|
25 |
+<p><strong>Wie oft möchten Sie über Sicherheitsprobleme benachrichtigt werden?</strong></p> |
|
26 |
+'.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 |
+ |
|
28 |
+$results = load_results(); |
|
29 |
+ |
|
30 |
+output('<h3>Aktuell installierte Web-Anwendungen</h3> |
|
31 |
+<p>Die folgenden Web-Anwendungen wurden beim letzten Programmdurchlauf gefunden. Diese Liste wird i.d.R. täglich aktualisiert.</p>'); |
|
32 |
+foreach ($results AS $app) { |
|
33 |
+ output("<div class='freewvs freewvs-{$app['state']}'>\n"); |
|
34 |
+ if ($app['state'] == 'ok') { |
|
35 |
+ output("<img src='{$prefix}images/ok.png' />\n"); |
|
36 |
+ output("<p><strong>{$app['appname']} {$app['version']}</strong></p>\n"); |
|
37 |
+ output("<p>Diese Anwendung ist aktuell und hat keine allgemein bekannten Sicherheitsprobleme.</p>\n"); |
|
38 |
+ output("<p>Gefunden in {$app['directory']}</p>\n"); |
|
39 |
+ } |
|
40 |
+ else { |
|
41 |
+ $vulnlink = $app['vulninfo']; |
|
42 |
+ $doclink = get_upgradeinstructions($app['appname']); |
|
43 |
+ if (substr($vulnlink, 0, 3) == 'CVE') { |
|
44 |
+ $vulnlink = 'http://cve.mitre.org/cgi-bin/cvename.cgi?name='.$vulnlink; |
|
45 |
+ } |
|
46 |
+ output("<img src='{$prefix}images/error.png' />\n"); |
|
47 |
+ output("<p><strong>{$app['appname']} {$app['version']}</strong></p>\n"); |
|
48 |
+ if ($app['safeversion'] != '') { |
|
49 |
+ output("<p>Diese Anwendung ist von Sicherheits-Problemen betroffen. Ein <strong>Update auf Version {$app['safeversion']}</strong> wird dringend empfohlen. Prüfen Sie anhand der unten genannten Referenz welche Gefahren von dieser Anwendung momentan ausgehen.</p>\n"); |
|
50 |
+ } else { |
|
51 |
+ output("<p>Diese Anwendung ist von Sicherheits-Problemen betroffen. Leider gibt es <strong>momentan keine aktualisierte Version</strong>. Prüfen Sie bitte anhand der unten genannten Beschreibung des Problem die möglichen Gefahren eines weiteren Betriebs dieser Anwendung.</p>\n"); |
|
52 |
+ } |
|
53 |
+ output("<p><strong>Referenz zu diesem Sicherheitsproblem: <a href='{$vulnlink}'>{$app['vulninfo']}</a></strong></p>"); |
|
54 |
+ output("<p>Gefunden in {$app['directory']}</p>\n"); |
|
55 |
+ if ($doclink != NULL) |
|
56 |
+ output('<p><strong>Hinweis:</strong> Um Ihnen das Upgrade leichter zu machen, möchten wir Sie auf eine <a href="'.$doclink.'">deutschsprachige Upgrade-Anleitung</a> aufmerksam machen.</p>'); |
|
57 |
+ } |
|
58 |
+ output("</div>\n"); |
|
59 |
+ #output("<tr><td>{$app['appname']} ({$app['version']})</td><td>{$app['state']}</td></tr>"); |
|
60 |
+} |
|
61 |
+#output('</table>'); |
|
62 |
+ |