7ae33deebfbf80fde9235c3cea37c80930fe1f77
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 11 years ago

modules/googleauth/overview.php   1) <?php
modules/googleauth/overview.php   2) /*
modules/googleauth/overview.php   3) This file belongs to the Webinterface of schokokeks.org Hosting
modules/googleauth/overview.php   4) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 1 year ago

modules/webmailtotp/overview.php  5) Written by schokokeks.org Hosting, namely
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 11 years ago

modules/googleauth/overview.php   6)   Bernd Wurst <bernd@schokokeks.org>
modules/googleauth/overview.php   7)   Hanno Böck <hanno@schokokeks.org>
modules/googleauth/overview.php   8) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 1 year ago

modules/webmailtotp/overview.php  9) This code is published under a 0BSD license.
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 11 years ago

modules/googleauth/overview.php  10) 
modules/googleauth/overview.php  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.
modules/googleauth/overview.php  12) */
modules/googleauth/overview.php  13) 
Bernd Wurst Umbenennung Google-Auth nac...

Bernd Wurst authored 11 years ago

modules/webmailtotp/overview.php 14) require_once('totp.php');
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 11 years ago

modules/googleauth/overview.php  15) require_role(ROLE_SYSTEMUSER);
modules/googleauth/overview.php  16) 
Bernd Wurst Umbenennung Google-Auth nac...

Bernd Wurst authored 11 years ago

modules/webmailtotp/overview.php 17) title("Zwei-Faktor-Anmeldung am Webmailer");
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 11 years ago

modules/googleauth/overview.php  18) 
modules/googleauth/overview.php  19) output('<p>Sie können bei '.config('company_name').' den Zugang zum Webmailer mit einem Zwei-Faktor-Prozess mit abweichendem Passwort schützen.</p>
modules/googleauth/overview.php  20) <p>Dieses System schützt Sie vor mitgelesenen Tastatureingaben in nicht vertrauenswürdiger Umgebung z.B. in einem Internet-Café.</p>
Hanno Böck motp-url gefixt, google aut...

Hanno Böck authored 2 years ago

modules/webmailtotp/overview.php 21) <p>Beim Zwei-Faktor-Prozess müssen Sie zum Login ein festes Webmail-Passwort und zusätzlich ein variabler Code, den beispielsweise Ihr Smartphone erzeugen kann, eingeben. Da sich dieser Code alle 30 Sekunden ändert, kann ein Angreifer sich nicht später mit einem abgehörten Passwort noch einmal anmelden. Zum Erzeugen des Einmal-Codes benötigen Sie ein Gerät, das <strong>TOTP-Einmalcodes nach RFC 6238</strong> erzeugt. Beispiele dafür sind Google-Authenticator oder <a href="https://f-droid.org/en/packages/org.cry.otp/">mOTP</a>. Meist ist dies ein Smartphone mit einer entsprechenden App.</p>
Bernd Wurst Umbenennung Google-Auth nac...

Bernd Wurst authored 11 years ago

modules/webmailtotp/overview.php 22) <p><strong>Beachten Sie:</strong> Die Zwei-Faktor-Anmeldung funktioniert nur für Webmail, beim Login via IMAP wird weiterhin nur das Passwort Ihres Postfachs benötigt. Damit dieses Passwort von einem Angreifer nicht mitgelesen werden kann, müssen Sie zur Zwei-Faktor-Anmeldung unbedingt ein separates Passwort festlegen.</p>
modules/webmailtotp/overview.php 23) <h3>Fügen Sie Zwei-Faktor-Anmeldung zu Ihren bestehenden Postfächern hinzu</h3>
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 11 years ago

modules/googleauth/overview.php  24) ');
modules/googleauth/overview.php  25) 
modules/googleauth/overview.php  26) 
modules/googleauth/overview.php  27) require_once('modules/email/include/hasaccount.php');
modules/googleauth/overview.php  28) require_once('modules/email/include/vmail.php');
modules/googleauth/overview.php  29) 
modules/googleauth/overview.php  30) if (! (user_has_accounts() || count(get_vmail_accounts())>0)) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

modules/webmailtotp/overview.php 31)     output('<p><em>Bisher haben Sie kein Postfach. Bitte erstellen sie zunächst ein Postfach.</em></p>');
modules/webmailtotp/overview.php 32) } else {
Hanno Böck more strict codingstyle wit...

Hanno Böck authored 1 year ago

modules/webmailtotp/overview.php 33)     /* VMAIL */
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 11 years ago

modules/googleauth/overview.php  34) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

modules/webmailtotp/overview.php 35)     $domains = get_vmail_domains();
modules/webmailtotp/overview.php 36)     $vmail_accounts = get_vmail_accounts();
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 11 years ago

modules/googleauth/overview.php  37) 
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 2 years ago

modules/webmailtotp/overview.php 38)     $sorted_by_domains = [];
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

modules/webmailtotp/overview.php 39)     foreach ($vmail_accounts as $account) {
modules/webmailtotp/overview.php 40)         if ($account['password'] == '') {
modules/webmailtotp/overview.php 41)             continue;
modules/webmailtotp/overview.php 42)         }
modules/webmailtotp/overview.php 43)         if (array_key_exists($account['domain'], $sorted_by_domains)) {
modules/webmailtotp/overview.php 44)             array_push($sorted_by_domains[$account['domain']], $account);
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 11 years ago

modules/googleauth/overview.php  45)         } else {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 2 years ago

modules/webmailtotp/overview.php 46)             $sorted_by_domains[$account['domain']] = [$account];
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 11 years ago

modules/googleauth/overview.php  47)         }
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

modules/webmailtotp/overview.php 48)     }
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 11 years ago

modules/googleauth/overview.php  49) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

modules/webmailtotp/overview.php 50)     DEBUG($sorted_by_domains);
modules/webmailtotp/overview.php 51) 
modules/webmailtotp/overview.php 52)     if (count($sorted_by_domains) > 0) {
modules/webmailtotp/overview.php 53)         foreach ($sorted_by_domains as $accounts_on_domain) {
modules/webmailtotp/overview.php 54)             if (count($sorted_by_domains) > 2) {
modules/webmailtotp/overview.php 55)                 output('<h4>'.$accounts_on_domain[0]['domainname'].'</h4>');
modules/webmailtotp/overview.php 56)             }
modules/webmailtotp/overview.php 57) 
modules/webmailtotp/overview.php 58)             foreach ($accounts_on_domain as $this_account) {
modules/webmailtotp/overview.php 59)                 $username = $this_account['local'].'@'.$this_account['domainname'];
modules/webmailtotp/overview.php 60)                 output('<div style="margin-left: 2em;"><p style="margin-left: -2em;"><strong>'.$username.'</strong></p>');
modules/webmailtotp/overview.php 61)                 $id = account_has_totp($username);
modules/webmailtotp/overview.php 62)                 if ($id) {
modules/webmailtotp/overview.php 63)                     output(addnew('delete', 'Zwei-Faktor-Anmeldung für dieses Postfach abschalten', 'id='.$id, 'style="background-image: url('.$prefix.'images/delete.png); color: red;"'));
modules/webmailtotp/overview.php 64)                 } else {
modules/webmailtotp/overview.php 65)                     output(addnew('setup', 'Zwei-Faktor-Anmeldung für dieses Postfach aktivieren', 'username='.urlencode($username)));
modules/webmailtotp/overview.php 66)                 }
modules/webmailtotp/overview.php 67)                 output('</div>');
modules/webmailtotp/overview.php 68)             }
modules/webmailtotp/overview.php 69)         }
modules/webmailtotp/overview.php 70)     }
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 11 years ago

modules/googleauth/overview.php  71) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

modules/webmailtotp/overview.php 72)     /* Mailaccounts */
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 11 years ago

modules/googleauth/overview.php  73) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

modules/webmailtotp/overview.php 74)     require_once('modules/email/include/mailaccounts.php');
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 11 years ago

modules/googleauth/overview.php  75) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

modules/webmailtotp/overview.php 76)     $accounts = mailaccounts($_SESSION['userinfo']['uid']);
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 11 years ago

modules/googleauth/overview.php  77) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

modules/webmailtotp/overview.php 78)     if (count($accounts) > 0) {
modules/webmailtotp/overview.php 79)         if (count($sorted_by_domains) > 0) {
modules/webmailtotp/overview.php 80)             output('<h3>IMAP/POP3-Accounts</h3>');
modules/webmailtotp/overview.php 81)         }
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 11 years ago

modules/googleauth/overview.php  82) 
modules/googleauth/overview.php  83) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

modules/webmailtotp/overview.php 84)         foreach ($accounts as $acc) {
modules/webmailtotp/overview.php 85)             if ($acc['mailbox']) {
modules/webmailtotp/overview.php 86)                 output('<div style="margin-left: 2em;"><p style="margin-left: -2em;"><strong>'.$acc['account'].'</strong></p>');
modules/webmailtotp/overview.php 87)                 $username = $acc['account'];
modules/webmailtotp/overview.php 88)                 $id = account_has_totp($username);
modules/webmailtotp/overview.php 89)                 if ($id) {
modules/webmailtotp/overview.php 90)                     output(addnew('delete', 'Zwei-Faktor-Anmeldung für dieses Postfach abschalten', 'id='.$id, 'style="background-image: url('.$prefix.'images/delete.png); color: red;"'));
modules/webmailtotp/overview.php 91)                 } else {
modules/webmailtotp/overview.php 92)                     output(addnew('setup', 'Zwei-Faktor-Anmeldung für dieses Postfach aktivieren', 'username='.urlencode($username)));
modules/webmailtotp/overview.php 93)                 }
modules/webmailtotp/overview.php 94)                 output('</div>');
modules/webmailtotp/overview.php 95)             }
modules/webmailtotp/overview.php 96)         }
Bernd Wurst Attribution für die externe...

Bernd Wurst authored 11 years ago

modules/googleauth/overview.php  97)     }