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
... ...
@@ -18,7 +18,7 @@ require_once('session/start.php');
18 18
 require_once('vmail.php');
19 19
 require_once('mailaccounts.php');
20 20
 
21
-require_role(array(ROLE_VMAIL_ACCOUNT, ROLE_MAILACCOUNT));
21
+require_role([ROLE_VMAIL_ACCOUNT, ROLE_MAILACCOUNT]);
22 22
 
23 23
 $role = $_SESSION['role'];
24 24
 
... ...
@@ -48,7 +48,7 @@ if (isset($_POST['password1']) && $_POST['password1'] != '') {
48 48
             success_msg('Ihr Passwort wurde geändert!');
49 49
         } elseif ($role & ROLE_MAILACCOUNT) {
50 50
             DEBUG("Ändere IMAP-Passwort");
51
-            change_mailaccount(get_mailaccount_id($accname), array('password' => $_POST['password1']));
51
+            change_mailaccount(get_mailaccount_id($accname), ['password' => $_POST['password1']]);
52 52
             success_msg('Ihr Passwort wurde geändert!');
53 53
         }
54 54
         redirect('/');
Browse code

give success message when changing mail account password

Bernd Wurst authored on 09/09/2020 06:17:53
Showing 1 changed files
... ...
@@ -45,15 +45,13 @@ if (isset($_POST['password1']) && $_POST['password1'] != '') {
45 45
         if ($role & ROLE_VMAIL_ACCOUNT) {
46 46
             DEBUG("Ändere VMail-Passwort");
47 47
             change_vmail_password($accname, $_POST['password1']);
48
+            success_msg('Ihr Passwort wurde geändert!');
48 49
         } elseif ($role & ROLE_MAILACCOUNT) {
49 50
             DEBUG("Ändere IMAP-Passwort");
50 51
             change_mailaccount(get_mailaccount_id($accname), array('password' => $_POST['password1']));
52
+            success_msg('Ihr Passwort wurde geändert!');
51 53
         }
52
-        if (! $debugmode) {
53
-            header('Location: /');
54
-        } else {
55
-            output('');
56
-        }
54
+        redirect('/');
57 55
     }
58 56
 }
59 57
 
Browse code

Use autocomplete=new-password on password changing forms

Hanno authored on 24/10/2019 21:14:02
Showing 1 changed files
... ...
@@ -65,11 +65,11 @@ output('<p>Hier können Sie Ihr Passwort ändern.</p>
65 65
     <td>bisheriges Passwort:</td>  <td><input type="password" name="old_password" value="" /></td>
66 66
   </tr>
67 67
   <tr>
68
-    <td>neues Passwort:</td>       <td><input type="password" name="password1" value="" /></td>
68
+    <td>neues Passwort:</td>       <td><input type="password" name="password1" value="" autocomplete="new-password" /></td>
69 69
   </tr>
70 70
   <tr>
71 71
     <td>Bestätigung:<br /><span style="font-size: 80%;">(nochmal neues Passwort)</span></td>
72
-                                   <td><input type="password" name="password2" value="" /></td>
72
+                                   <td><input type="password" name="password2" value="" autocomplete="new-password" /></td>
73 73
   </tr>
74 74
 </table>
75 75
 <p><input type="submit" value="Speichern" /></p>
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.
... ...
@@ -26,38 +26,35 @@ title("Passwort ändern");
26 26
 
27 27
 
28 28
 
29
-if (isset($_POST['password1']) && $_POST['password1'] != '')
30
-{
31
-  $accname = $_SESSION['mailaccount'];
32
-  check_form_token('email_chpass');
33
-  $result = find_role($accname, $_POST['old_password']);
34
-
35
-  if ($_POST['old_password'] == '')
36
-    input_error('Altes Passwort nicht angegeben!');
37
-  elseif (! $result & ROLE_VMAIL_ACCOUNT)
38
-    input_error('Das bisherige Passwort ist nicht korrekt!');
39
-  elseif ($_POST['password2'] != $_POST['password1'])
40
-    input_error('Die Bestätigung ist nicht identisch mit dem neuen Passwort!');
41
-  elseif ($_POST['password2'] == '')
42
-    input_error('Sie müssen das neue Passwort zweimal eingeben!');
43
-  elseif (($check = strong_password($_POST['password1'])) !== true)
44
-    input_error("Das Passwort ist zu einfach ({$check})!");
45
-  else {
46
-    if ($role & ROLE_VMAIL_ACCOUNT)
47
-    {
48
-      DEBUG("Ändere VMail-Passwort");
49
-      change_vmail_password($accname, $_POST['password1']);
50
-    }
51
-    elseif ($role & ROLE_MAILACCOUNT)
52
-    {
53
-      DEBUG("Ändere IMAP-Passwort");
54
-      change_mailaccount(get_mailaccount_id($accname), array('password' => $_POST['password1']));
29
+if (isset($_POST['password1']) && $_POST['password1'] != '') {
30
+    $accname = $_SESSION['mailaccount'];
31
+    check_form_token('email_chpass');
32
+    $result = find_role($accname, $_POST['old_password']);
33
+
34
+    if ($_POST['old_password'] == '') {
35
+        input_error('Altes Passwort nicht angegeben!');
36
+    } elseif (! $result & ROLE_VMAIL_ACCOUNT) {
37
+        input_error('Das bisherige Passwort ist nicht korrekt!');
38
+    } elseif ($_POST['password2'] != $_POST['password1']) {
39
+        input_error('Die Bestätigung ist nicht identisch mit dem neuen Passwort!');
40
+    } elseif ($_POST['password2'] == '') {
41
+        input_error('Sie müssen das neue Passwort zweimal eingeben!');
42
+    } elseif (($check = strong_password($_POST['password1'])) !== true) {
43
+        input_error("Das Passwort ist zu einfach ({$check})!");
44
+    } else {
45
+        if ($role & ROLE_VMAIL_ACCOUNT) {
46
+            DEBUG("Ändere VMail-Passwort");
47
+            change_vmail_password($accname, $_POST['password1']);
48
+        } elseif ($role & ROLE_MAILACCOUNT) {
49
+            DEBUG("Ändere IMAP-Passwort");
50
+            change_mailaccount(get_mailaccount_id($accname), array('password' => $_POST['password1']));
51
+        }
52
+        if (! $debugmode) {
53
+            header('Location: /');
54
+        } else {
55
+            output('');
56
+        }
55 57
     }
56
-    if (! $debugmode)
57
-      header('Location: /');
58
-    else
59
-      output('');
60
-  }
61 58
 }
62 59
 
63 60
 
... ...
@@ -77,5 +74,3 @@ output('<p>Hier können Sie Ihr Passwort ändern.</p>
77 74
 </table>
78 75
 <p><input type="submit" value="Speichern" /></p>
79 76
 '));
80
-
81
-
Browse code

Referenzen auf cracklib entfernt

Bernd Wurst authored on 09/02/2018 05:58:06
Showing 1 changed files
... ...
@@ -41,7 +41,7 @@ if (isset($_POST['password1']) && $_POST['password1'] != '')
41 41
   elseif ($_POST['password2'] == '')
42 42
     input_error('Sie müssen das neue Passwort zweimal eingeben!');
43 43
   elseif (($check = strong_password($_POST['password1'])) !== true)
44
-    input_error("Das Passwort ist zu einfach (cracklib sagt: {$check})!");
44
+    input_error("Das Passwort ist zu einfach ({$check})!");
45 45
   else {
46 46
     if ($role & ROLE_VMAIL_ACCOUNT)
47 47
     {
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

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

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
 require_once('vmail.php');
Browse code

Index-Blöcke werden jetzt vond en Modulen selbst bereitgestellt

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

bernd authored on 08/03/2012 14:33:17
Showing 1 changed files
... ...
@@ -40,7 +40,7 @@ if (isset($_POST['password1']) && $_POST['password1'] != '')
40 40
       change_mailaccount(get_mailaccount_id($accname), array('password' => $_POST['password1']));
41 41
     }
42 42
     if (! $debugmode)
43
-      header('Location: chpass');
43
+      header('Location: /');
44 44
     else
45 45
       output('');
46 46
   }
Browse code

VMail-User können ihre Einstellungen selbst vornehmen und bekommen eine individuelle Startseite mit den Einstellungen.

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

bernd authored on 29/02/2012 13:26:13
Showing 1 changed files
... ...
@@ -12,7 +12,7 @@ title("Passwort ändern");
12 12
 
13 13
 
14 14
 
15
-if ($_POST['password1'] != '')
15
+if (isset($_POST['password1']) && $_POST['password1'] != '')
16 16
 {
17 17
   $accname = $_SESSION['mailaccount'];
18 18
   check_form_token('email_chpass');
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
... ...
@@ -8,7 +8,7 @@ require_role(array(ROLE_VMAIL_ACCOUNT, ROLE_MAILACCOUNT));
8 8
 
9 9
 $role = $_SESSION['role'];
10 10
 
11
-$title = "Passwort ändern";
11
+title("Passwort ändern");
12 12
 
13 13
 
14 14
 
... ...
@@ -48,8 +48,7 @@ if ($_POST['password1'] != '')
48 48
 
49 49
 
50 50
 
51
-output('<h3>Passwort ändern</h3>
52
-<p>Hier können Sie Ihr Passwort ändern.</p>
51
+output('<p>Hier können Sie Ihr Passwort ändern.</p>
53 52
 '.html_form('email_chpass', 'chpass', '', '<table>
54 53
   <tr>
55 54
     <td>bisheriges Passwort:</td>  <td><input type="password" name="old_password" value="" /></td>
Browse code

Virtuelle Accounts richtig nutzen, bugfix

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

bernd authored on 17/09/2008 21:15:01
Showing 1 changed files
... ...
@@ -14,15 +14,7 @@ $title = "Passwort ändern";
14 14
 
15 15
 if ($_POST['password1'] != '')
16 16
 {
17
-  $accname = '';
18
-  if ($role & ROLE_VMAIL_ACCOUNT)
19
-  {
20
-    $accname = $_SESSION['accountname'];
21
-  }
22
-  elseif ($role & ROLE_MAILACCOUNT)
23
-  {
24
-    $accname = $_SESSION['mailaccount'];
25
-  }
17
+  $accname = $_SESSION['mailaccount'];
26 18
   check_form_token('email_chpass');
27 19
   $result = find_role($accname, $_POST['old_password']);
28 20
 
Browse code

eliminate .php extensions for URLs

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

bernd authored on 08/08/2008 19:32:32
Showing 1 changed files
... ...
@@ -48,7 +48,7 @@ if ($_POST['password1'] != '')
48 48
       change_mailaccount(get_mailaccount_id($accname), array('password' => $_POST['password1']));
49 49
     }
50 50
     if (! $debugmode)
51
-      header('Location: chpass.php');
51
+      header('Location: chpass');
52 52
     else
53 53
       output('');
54 54
   }
... ...
@@ -58,7 +58,7 @@ if ($_POST['password1'] != '')
58 58
 
59 59
 output('<h3>Passwort ändern</h3>
60 60
 <p>Hier können Sie Ihr Passwort ändern.</p>
61
-'.html_form('email_chpass', 'chpass.php', '', '<table>
61
+'.html_form('email_chpass', 'chpass', '', '<table>
62 62
   <tr>
63 63
     <td>bisheriges Passwort:</td>  <td><input type="password" name="old_password" value="" /></td>
64 64
   </tr>
Browse code

Alles in das email-modul verschoben

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

bernd authored on 03/04/2008 16:02:28
Showing 1 changed files
... ...
@@ -1,19 +1,30 @@
1 1
 <?php
2 2
 
3 3
 require_once('session/start.php');
4
-
5 4
 require_once('vmail.php');
5
+require_once('mailaccounts.php');
6 6
 
7
-require_role(ROLE_VMAIL_ACCOUNT);
7
+require_role(array(ROLE_VMAIL_ACCOUNT, ROLE_MAILACCOUNT));
8 8
 
9
-$accname = $_SESSION['mailaccount'];
9
+$role = $_SESSION['role'];
10 10
 
11 11
 $title = "Passwort ändern";
12 12
 
13
+
14
+
13 15
 if ($_POST['password1'] != '')
14 16
 {
15
-  check_form_token('vmail_chpass');
16
-  $result = find_role($_SESSION['mailaccount'], $_POST['old_password']);
17
+  $accname = '';
18
+  if ($role & ROLE_VMAIL_ACCOUNT)
19
+  {
20
+    $accname = $_SESSION['accountname'];
21
+  }
22
+  elseif ($role & ROLE_MAILACCOUNT)
23
+  {
24
+    $accname = $_SESSION['mailaccount'];
25
+  }
26
+  check_form_token('email_chpass');
27
+  $result = find_role($accname, $_POST['old_password']);
17 28
 
18 29
   if ($_POST['old_password'] == '')
19 30
     input_error('Altes Passwort nicht angegeben!');
... ...
@@ -26,7 +37,16 @@ if ($_POST['password1'] != '')
26 37
   elseif (($check = strong_password($_POST['password1'])) !== true)
27 38
     input_error("Das Passwort ist zu einfach (cracklib sagt: {$check})!");
28 39
   else {
29
-    change_vmail_password($accname, $_POST['password1']);
40
+    if ($role & ROLE_VMAIL_ACCOUNT)
41
+    {
42
+      DEBUG("Ändere VMail-Passwort");
43
+      change_vmail_password($accname, $_POST['password1']);
44
+    }
45
+    elseif ($role & ROLE_MAILACCOUNT)
46
+    {
47
+      DEBUG("Ändere IMAP-Passwort");
48
+      change_mailaccount(get_mailaccount_id($accname), array('password' => $_POST['password1']));
49
+    }
30 50
     if (! $debugmode)
31 51
       header('Location: chpass.php');
32 52
     else
... ...
@@ -38,7 +58,7 @@ if ($_POST['password1'] != '')
38 58
 
39 59
 output('<h3>Passwort ändern</h3>
40 60
 <p>Hier können Sie Ihr Passwort ändern.</p>
41
-'.html_form('vmail_chpass', 'chpass.php', '', '<table>
61
+'.html_form('email_chpass', 'chpass.php', '', '<table>
42 62
   <tr>
43 63
     <td>bisheriges Passwort:</td>  <td><input type="password" name="old_password" value="" /></td>
44 64
   </tr>
... ...
@@ -54,6 +74,3 @@ output('<h3>Passwort ändern</h3>
54 74
 '));
55 75
 
56 76
 
57
-
58
-
59
-?>
Browse code

Großer VMail-move

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

bernd authored on 03/04/2008 10:38:22
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,59 @@
1
+<?php
2
+
3
+require_once('session/start.php');
4
+
5
+require_once('vmail.php');
6
+
7
+require_role(ROLE_VMAIL_ACCOUNT);
8
+
9
+$accname = $_SESSION['mailaccount'];
10
+
11
+$title = "Passwort ändern";
12
+
13
+if ($_POST['password1'] != '')
14
+{
15
+  check_form_token('vmail_chpass');
16
+  $result = find_role($_SESSION['mailaccount'], $_POST['old_password']);
17
+
18
+  if ($_POST['old_password'] == '')
19
+    input_error('Altes Passwort nicht angegeben!');
20
+  elseif (! $result & ROLE_VMAIL_ACCOUNT)
21
+    input_error('Das bisherige Passwort ist nicht korrekt!');
22
+  elseif ($_POST['password2'] != $_POST['password1'])
23
+    input_error('Die Bestätigung ist nicht identisch mit dem neuen Passwort!');
24
+  elseif ($_POST['password2'] == '')
25
+    input_error('Sie müssen das neue Passwort zweimal eingeben!');
26
+  elseif (($check = strong_password($_POST['password1'])) !== true)
27
+    input_error("Das Passwort ist zu einfach (cracklib sagt: {$check})!");
28
+  else {
29
+    change_vmail_password($accname, $_POST['password1']);
30
+    if (! $debugmode)
31
+      header('Location: chpass.php');
32
+    else
33
+      output('');
34
+  }
35
+}
36
+
37
+
38
+
39
+output('<h3>Passwort ändern</h3>
40
+<p>Hier können Sie Ihr Passwort ändern.</p>
41
+'.html_form('vmail_chpass', 'chpass.php', '', '<table>
42
+  <tr>
43
+    <td>bisheriges Passwort:</td>  <td><input type="password" name="old_password" value="" /></td>
44
+  </tr>
45
+  <tr>
46
+    <td>neues Passwort:</td>       <td><input type="password" name="password1" value="" /></td>
47
+  </tr>
48
+  <tr>
49
+    <td>Bestätigung:<br /><span style="font-size: 80%;">(nochmal neues Passwort)</span></td>
50
+                                   <td><input type="password" name="password2" value="" /></td>
51
+  </tr>
52
+</table>
53
+<p><input type="submit" value="Speichern" /></p>
54
+'));
55
+
56
+
57
+
58
+
59
+?>