da2eaa6d6f8367bf912f8f72272dedd012cbf3e2
bernd Auch vmail-user dürfen Pass...

bernd authored 16 years ago

modules/vmail/chpass.php  1) <?php
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

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

Bernd Wurst authored 6 years ago

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

Bernd Wurst authored 12 years ago

modules/email/chpass.php  6)   Bernd Wurst <bernd@schokokeks.org>
modules/email/chpass.php  7)   Hanno Böck <hanno@schokokeks.org>
modules/email/chpass.php  8) 
modules/email/chpass.php  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.
modules/email/chpass.php 10) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/chpass.php 11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

modules/email/chpass.php 12) http://creativecommons.org/publicdomain/zero/1.0/
modules/email/chpass.php 13) 
modules/email/chpass.php 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.
modules/email/chpass.php 15) */
bernd Auch vmail-user dürfen Pass...

bernd authored 16 years ago

modules/vmail/chpass.php 16) 
modules/vmail/chpass.php 17) require_once('session/start.php');
modules/vmail/chpass.php 18) require_once('vmail.php');
bernd Alles in das email-modul ve...

bernd authored 16 years ago

modules/email/chpass.php 19) require_once('mailaccounts.php');
bernd Auch vmail-user dürfen Pass...

bernd authored 16 years ago

modules/vmail/chpass.php 20) 
bernd Alles in das email-modul ve...

bernd authored 16 years ago

modules/email/chpass.php 21) require_role(array(ROLE_VMAIL_ACCOUNT, ROLE_MAILACCOUNT));
bernd Auch vmail-user dürfen Pass...

bernd authored 16 years ago

modules/vmail/chpass.php 22) 
bernd Alles in das email-modul ve...

bernd authored 16 years ago

modules/email/chpass.php 23) $role = $_SESSION['role'];
bernd Auch vmail-user dürfen Pass...

bernd authored 16 years ago

modules/vmail/chpass.php 24) 
bernd Benutze überall title() sta...

bernd authored 14 years ago

modules/email/chpass.php 25) title("Passwort ändern");
bernd Auch vmail-user dürfen Pass...

bernd authored 16 years ago

modules/vmail/chpass.php 26) 
bernd Alles in das email-modul ve...

bernd authored 16 years ago

modules/email/chpass.php 27) 
modules/email/chpass.php 28) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/chpass.php 29) if (isset($_POST['password1']) && $_POST['password1'] != '') {
modules/email/chpass.php 30)     $accname = $_SESSION['mailaccount'];
modules/email/chpass.php 31)     check_form_token('email_chpass');
modules/email/chpass.php 32)     $result = find_role($accname, $_POST['old_password']);
modules/email/chpass.php 33) 
modules/email/chpass.php 34)     if ($_POST['old_password'] == '') {
modules/email/chpass.php 35)         input_error('Altes Passwort nicht angegeben!');
modules/email/chpass.php 36)     } elseif (! $result & ROLE_VMAIL_ACCOUNT) {
modules/email/chpass.php 37)         input_error('Das bisherige Passwort ist nicht korrekt!');
modules/email/chpass.php 38)     } elseif ($_POST['password2'] != $_POST['password1']) {
modules/email/chpass.php 39)         input_error('Die Bestätigung ist nicht identisch mit dem neuen Passwort!');
modules/email/chpass.php 40)     } elseif ($_POST['password2'] == '') {
modules/email/chpass.php 41)         input_error('Sie müssen das neue Passwort zweimal eingeben!');
modules/email/chpass.php 42)     } elseif (($check = strong_password($_POST['password1'])) !== true) {
modules/email/chpass.php 43)         input_error("Das Passwort ist zu einfach ({$check})!");
modules/email/chpass.php 44)     } else {
modules/email/chpass.php 45)         if ($role & ROLE_VMAIL_ACCOUNT) {
modules/email/chpass.php 46)             DEBUG("Ändere VMail-Passwort");
modules/email/chpass.php 47)             change_vmail_password($accname, $_POST['password1']);
modules/email/chpass.php 48)         } elseif ($role & ROLE_MAILACCOUNT) {
modules/email/chpass.php 49)             DEBUG("Ändere IMAP-Passwort");
modules/email/chpass.php 50)             change_mailaccount(get_mailaccount_id($accname), array('password' => $_POST['password1']));
modules/email/chpass.php 51)         }
modules/email/chpass.php 52)         if (! $debugmode) {
modules/email/chpass.php 53)             header('Location: /');
modules/email/chpass.php 54)         } else {
modules/email/chpass.php 55)             output('');
modules/email/chpass.php 56)         }
bernd Alles in das email-modul ve...

bernd authored 16 years ago

modules/email/chpass.php 57)     }
bernd Auch vmail-user dürfen Pass...

bernd authored 16 years ago

modules/vmail/chpass.php 58) }
modules/vmail/chpass.php 59) 
modules/vmail/chpass.php 60) 
modules/vmail/chpass.php 61) 
bernd Benutze überall title() sta...

bernd authored 14 years ago

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

bernd authored 16 years ago

modules/email/chpass.php 63) '.html_form('email_chpass', 'chpass', '', '<table>
bernd Auch vmail-user dürfen Pass...

bernd authored 16 years ago

modules/vmail/chpass.php 64)   <tr>
modules/vmail/chpass.php 65)     <td>bisheriges Passwort:</td>  <td><input type="password" name="old_password" value="" /></td>
modules/vmail/chpass.php 66)   </tr>
modules/vmail/chpass.php 67)   <tr>
Hanno Use autocomplete=new-passwo...

Hanno authored 5 years ago

modules/email/chpass.php 68)     <td>neues Passwort:</td>       <td><input type="password" name="password1" value="" autocomplete="new-password" /></td>
bernd Auch vmail-user dürfen Pass...

bernd authored 16 years ago

modules/vmail/chpass.php 69)   </tr>
modules/vmail/chpass.php 70)   <tr>
modules/vmail/chpass.php 71)     <td>Bestätigung:<br /><span style="font-size: 80%;">(nochmal neues Passwort)</span></td>
Hanno Use autocomplete=new-passwo...

Hanno authored 5 years ago

modules/email/chpass.php 72)                                    <td><input type="password" name="password2" value="" autocomplete="new-password" /></td>