dcc202fb249a446ac15c7cf413b9f1b4a3f31b58
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 {
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 11 years ago

modules/googleauth/overview.php  33) 
modules/googleauth/overview.php  34) /* VMAIL */
modules/googleauth/overview.php  35) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

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

Bernd Wurst authored 11 years ago

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

Hanno Böck authored 2 years ago

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

Hanno authored 5 years ago

modules/webmailtotp/overview.php 40)     foreach ($vmail_accounts as $account) {
modules/webmailtotp/overview.php 41)         if ($account['password'] == '') {
modules/webmailtotp/overview.php 42)             continue;
modules/webmailtotp/overview.php 43)         }
modules/webmailtotp/overview.php 44)         if (array_key_exists($account['domain'], $sorted_by_domains)) {
modules/webmailtotp/overview.php 45)             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  46)         } else {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 2 years ago

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

Bernd Wurst authored 11 years ago

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

Hanno authored 5 years ago

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

Bernd Wurst authored 11 years ago

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

Hanno authored 5 years ago

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

Bernd Wurst authored 11 years ago

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

Hanno authored 5 years ago

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

Bernd Wurst authored 11 years ago

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

Hanno authored 5 years ago

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

Bernd Wurst authored 11 years ago

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

Hanno authored 5 years ago

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

Bernd Wurst authored 11 years ago

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

Hanno authored 5 years ago

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

Bernd Wurst authored 11 years ago

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

Hanno authored 5 years ago

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

Bernd Wurst authored 11 years ago

modules/googleauth/overview.php  98)     }