Browse code

Spaces between string concat (.) operator, new PER codingstyle

Hanno Böck authored on 31/10/2023 17:49:30
Showing 1 changed files
... ...
@@ -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).' &#160; <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) . ' &#160; <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
     }
Browse code

codingstyle, spaces between operators

Hanno Böck authored on 02/09/2023 07:49:40
Showing 1 changed files
... ...
@@ -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
 
Browse code

Change license from CC0 to 0BSD, all contributors agreed

Hanno Böck authored on 20/08/2022 09:22:23
Showing 1 changed files
... ...
@@ -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
 */
Browse code

Codingstyle PSR12 + array syntax

Hanno Böck authored on 30/10/2021 21:18:17
Showing 1 changed files
... ...
@@ -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).' &#160; <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).' &#160; <input type="submit" value="speichern" /></p>'));
45 45
 
46 46
 $results = load_results();
47 47
 
Browse code

XSS in freewvs dirs

Hanno Böck authored on 08/12/2019 09:28:18
Showing 1 changed files
... ...
@@ -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 {
Browse code

Fix coding style with php-cs-checker, see https://cs.sensiolabs.org/

Hanno authored on 26/06/2018 13:58:19
Showing 1 changed files
... ...
@@ -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
-
Browse code

Copyright year update

Bernd Wurst authored on 13/01/2018 06:07:05
Showing 1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2014 by schokokeks.org Hosting, namely
5
+Written 2008-2018 by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 8
 
Browse code

change mitre/cve URL to https

Hanno Böck authored on 06/01/2017 16:30:32
Showing 1 changed files
... ...
@@ -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");
Browse code

Umformulierungen im Bereich freewvs. Mache dem User deutlicher um was es geht.

Bernd Wurst authored on 18/02/2015 17:04:31
Showing 1 changed files
... ...
@@ -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).' &#160; <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).' &#160; <input type="submit" value="speichern" /></p>'));
45 45
 
46 46
 $results = load_results();
47 47
 
Browse code

Lizenzinfos in eigenes Modul ausgelagert und Copyright auf 2014 angepasst

Bernd Wurst authored on 08/02/2014 05:45:07
Showing 1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2013 by schokokeks.org Hosting, namely
5
+Written 2008-2014 by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 8
 
Browse code

* Weitere Module auf prepared-statements umgestellt * Warnung beim Aufruf von db_escape_string() und maybe_null() hinzugefügt

Bernd Wurst authored on 03/02/2014 16:57:44
Showing 1 changed files
... ...
@@ -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
 
Browse code

Umstellung auf PDO-Datenbankverbindung

Bernd Wurst authored on 01/02/2014 18:38:23
Showing 1 changed files
... ...
@@ -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');
Browse code

Updated copyright notice (2012 => 2013)

Bernd Wurst authored on 19/01/2013 10:49:50
Showing 1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2012 by schokokeks.org Hosting, namely
5
+Written 2008-2013 by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 8
 
Browse code

Added license tags for CC0, README and COPYING

Bernd Wurst authored on 11/03/2012 15:40:04
Showing 1 changed files
... ...
@@ -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
 
Browse code

Benutze überall title() statt output("<h3>...</h3>")

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1812 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on 18/09/2010 13:35:15
Showing 1 changed files
... ...
@@ -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>
Browse code

fehlermeldung genauer, wir checken nicht auf aktualität

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1767 87cf0b9e-d624-0410-a070-f6ee81989793

hanno authored on 02/08/2010 13:20:50
Showing 1 changed files
... ...
@@ -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'];
Browse code

neue Bilder, mehr SSL-Zertifikate-Verwaltung

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1445 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on 29/08/2009 17:08:03
Showing 1 changed files
... ...
@@ -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");
Browse code

Bugfixes beim Webapp-installer

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1414 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on 16/07/2009 09:17:07
Showing 1 changed files
... ...
@@ -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");
Browse code

Einige Dummheiten repariert, die beim ersetzen von $config durch config() aufgetreten sind. Zudem einige Closing-Tag-mismatches repariert, die man nur sieht wenn man XHTML-Modus einschaltet

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1377 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on 23/05/2009 15:55:23
Showing 1 changed files
... ...
@@ -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).' &#160; <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).' &#160; <input type="submit" value="speichern" /></p>'));
28 28
 
29 29
 $results = load_results();
30 30
 
Browse code

* alle internen Links sinnvoll (und gleichartig!) encoden * Automatischer Upgrader für Drupal funktioniert jetzt

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1301 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on 07/03/2009 14:48:53
Showing 1 changed files
... ...
@@ -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>");
Browse code

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1299 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on 07/03/2009 09:21:11
Showing 1 changed files
... ...
@@ -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
   }
Browse code

Umbenennung von freewvs-modul in webapps-Modul

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1270 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on 25/02/2009 16:54:56
Showing 1 changed files
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).' &#160; <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
+