Google-Auth-Token setzen un...
Bernd Wurst authored 12 years ago
|
modules/googleauth/test.php 1) <?php
modules/googleauth/test.php 2) /*
modules/googleauth/test.php 3) This file belongs to the Webinterface of schokokeks.org Hosting
modules/googleauth/test.php 4)
|
Copyright year update
Bernd Wurst authored 7 years ago
|
modules/webmailtotp/test.php 5) Written 2008-2018 by schokokeks.org Hosting, namely
|
Google-Auth-Token setzen un...
Bernd Wurst authored 12 years ago
|
modules/googleauth/test.php 6) Bernd Wurst <bernd@schokokeks.org>
modules/googleauth/test.php 7) Hanno Böck <hanno@schokokeks.org>
modules/googleauth/test.php 8)
modules/googleauth/test.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/googleauth/test.php 10)
modules/googleauth/test.php 11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
modules/googleauth/test.php 12) http://creativecommons.org/publicdomain/zero/1.0/
modules/googleauth/test.php 13)
modules/googleauth/test.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/googleauth/test.php 15) */
modules/googleauth/test.php 16)
modules/googleauth/test.php 17) require_once('inc/base.php');
modules/googleauth/test.php 18) require_once('inc/icons.php');
modules/googleauth/test.php 19) require_role(ROLE_SYSTEMUSER);
modules/googleauth/test.php 20)
|
Umbenennung Google-Auth nac...
Bernd Wurst authored 12 years ago
|
modules/webmailtotp/test.php 21) require_once('totp.php');
|
Google-Auth-Token setzen un...
Bernd Wurst authored 12 years ago
|
modules/googleauth/test.php 22)
|
Umbenennung Google-Auth nac...
Bernd Wurst authored 12 years ago
|
modules/webmailtotp/test.php 23) $section='webmailtotp_overview';
modules/webmailtotp/test.php 24) title('Test der Zwei-Faktor-Anmeldung');
|
Google-Auth-Token setzen un...
Bernd Wurst authored 12 years ago
|
modules/googleauth/test.php 25)
|
löschen der OTP-Authentifiz...
Bernd Wurst authored 12 years ago
|
modules/googleauth/test.php 26) if (isset($_REQUEST['username'])) {
modules/googleauth/test.php 27) $username = $_REQUEST['username'];
modules/googleauth/test.php 28) $webmailpw = $_REQUEST['webmailpass'];
|
Umbenennung Google-Auth nac...
Bernd Wurst authored 12 years ago
|
modules/webmailtotp/test.php 29) $ga_code = $_REQUEST['totp_code'];
|
löschen der OTP-Authentifiz...
Bernd Wurst authored 12 years ago
|
modules/googleauth/test.php 30)
|
Füge Masterdomain automatis...
Bernd Wurst authored 12 years ago
|
modules/googleauth/test.php 31) if (! strstr($username, '@')) {
modules/googleauth/test.php 32) // Default-Domainname
modules/googleauth/test.php 33) $username = $username.'@'.config('masterdomain');
modules/googleauth/test.php 34) }
modules/googleauth/test.php 35)
|
löschen der OTP-Authentifiz...
Bernd Wurst authored 12 years ago
|
modules/googleauth/test.php 36) $success = true;
modules/googleauth/test.php 37)
modules/googleauth/test.php 38) if (! check_webmail_password($username, $webmailpw)) {
modules/googleauth/test.php 39) input_error('Das Webmail-Passwort hat nicht gestimmt.');
modules/googleauth/test.php 40) $success = false;
modules/googleauth/test.php 41) }
modules/googleauth/test.php 42)
|
blacklist für eingegebene C...
Bernd Wurst authored 12 years ago
|
modules/googleauth/test.php 43) if (check_locked($username)) {
modules/googleauth/test.php 44) input_error('Aufgrund einiger Fehlversuche wurde dieses Konto übergangsweise deaktiviert. Bitte warten Sie ein paar Minuten.');
modules/googleauth/test.php 45) $success = false;
|
Umbenennung Google-Auth nac...
Bernd Wurst authored 12 years ago
|
modules/webmailtotp/test.php 46) } elseif (! check_totp($username, $ga_code)) {
modules/webmailtotp/test.php 47) input_error('Der TOTP-Code wurde nicht akzeptiert.');
|
löschen der OTP-Authentifiz...
Bernd Wurst authored 12 years ago
|
modules/googleauth/test.php 48) $success = false;
modules/googleauth/test.php 49) }
modules/googleauth/test.php 50)
|
blacklist für eingegebene C...
Bernd Wurst authored 12 years ago
|
modules/googleauth/test.php 51)
|
löschen der OTP-Authentifiz...
Bernd Wurst authored 12 years ago
|
modules/googleauth/test.php 52) if ($success) {
modules/googleauth/test.php 53) output('<p>'.icon_ok().' Der Test war erfolgreich!');
modules/googleauth/test.php 54) } else {
modules/googleauth/test.php 55) output('<p>'.icon_error().' Der Test war leider nicht erfolgreich.');
modules/googleauth/test.php 56) }
modules/googleauth/test.php 57)
modules/googleauth/test.php 58)
modules/googleauth/test.php 59) output('<h3>Weiterer Test</h3>');
|
Google-Auth-Token setzen un...
Bernd Wurst authored 12 years ago
|
modules/googleauth/test.php 60) } else {
|
löschen der OTP-Authentifiz...
Bernd Wurst authored 12 years ago
|
modules/googleauth/test.php 61) $username = '';
modules/googleauth/test.php 62) output('<p>Geben Sie hier die Login-Daten ein um Ihren Zugang zu testen.</p>');
|
Google-Auth-Token setzen un...
Bernd Wurst authored 12 years ago
|
modules/googleauth/test.php 63) }
modules/googleauth/test.php 64)
modules/googleauth/test.php 65) $form = '<p>Ihr Webmail-Benutzername: <input type="text" name="username" value="'.filter_input_general($username).'" /></p>
modules/googleauth/test.php 66) <p>Ihr neues Webmail-Passwort: <input type="password" name="webmailpass" /></p>
|
Umbenennung Google-Auth nac...
Bernd Wurst authored 12 years ago
|
modules/webmailtotp/test.php 67) <p>Der aktuellste Einmal-Code: <input type="text" name="totp_code" /></p>
|
Google-Auth-Token setzen un...
Bernd Wurst authored 12 years ago
|
modules/googleauth/test.php 68) <p><input type="submit" value="Prüfen!" /></p>';
modules/googleauth/test.php 69)
modules/googleauth/test.php 70)
|
Umbenennung Google-Auth nac...
Bernd Wurst authored 12 years ago
|
modules/webmailtotp/test.php 71) output(html_form('webmailtotp_test', 'test', '', $form));
|