632f53988387881f6ae083e541b0560e2b88def4
bernd Auch mailaccounts können si...

bernd authored 17 years ago

1) <?php
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

2) /*
3) This file belongs to the Webinterface of schokokeks.org Hosting
4) 
Bernd Wurst Copyright year update

Bernd Wurst authored 6 years ago

5) Written 2008-2018 by schokokeks.org Hosting, namely
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

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) */
bernd Auch mailaccounts können si...

bernd authored 17 years ago

16) 
17) require_once('session/start.php');
18) 
19) require_once('mailaccounts.php');
20) 
21) require_role(ROLE_MAILACCOUNT);
22) 
23) $account = $_SESSION['accountname'];
24) 
bernd Benutze überall title() sta...

bernd authored 14 years ago

25) title("Passwort ändern");
bernd Auch mailaccounts können si...

bernd authored 17 years ago

26) 
27) if ($_POST['password1'] != '')
28) {
29)   check_form_token('imap_chpass');
30)   $result = find_role($_SESSION['mailaccount'], $_POST['old_password']);
31) 
32)   if ($_POST['old_password'] == '')
33)     input_error('Altes Passwort nicht angegeben!');
34)   elseif (! $result & ROLE_MAILACCOUNT)
35)     input_error('Das bisherige Passwort ist nicht korrekt!');
36)   elseif ($_POST['password2'] != $_POST['password1'])
37)     input_error('Die Bestätigung ist nicht identisch mit dem neuen Passwort!');
38)   elseif ($_POST['password2'] == '')
39)     input_error('Sie müssen das neue Passwort zweimal eingeben!');
40)   elseif (($check = strong_password($_POST['password1'])) !== true)
Bernd Wurst Referenzen auf cracklib ent...

Bernd Wurst authored 6 years ago

41)     input_error("Das Passwort ist zu einfach ({$check})!");
bernd Auch mailaccounts können si...

bernd authored 17 years ago

42)   else {
43)     change_mailaccount(get_mailaccount_id($_SESSION['mailaccount']), array('password' => $_POST['password1']));
44)     if (! $debugmode)
bernd eliminate .php extensions f...

bernd authored 16 years ago

45)       header('Location: chpass');
bernd Auch mailaccounts können si...

bernd authored 17 years ago

46)     else
47)       output('');
48)   }
49) }
50) 
51) 
52) 
bernd Benutze überall title() sta...

bernd authored 14 years ago

53) output('<p>Hier können Sie Ihr Passwort ändern.</p>
bernd eliminate .php extensions f...

bernd authored 16 years ago

54) '.html_form('imap_chpass', 'chpass', '', '<table>
bernd Auch mailaccounts können si...

bernd authored 17 years ago

55)   <tr>
56)     <td>bisheriges Passwort:</td>  <td><input type="password" name="old_password" value="" /></td>
57)   </tr>
58)   <tr>
59)     <td>neues Passwort:</td>       <td><input type="password" name="password1" value="" /></td>
60)   </tr>
61)   <tr>
bernd Entities repariert

bernd authored 17 years ago

62)     <td>Bestätigung:<br /><span style="font-size: 80%;">(nochmal neues Passwort)</span></td>