0053276052ecac0a19df41c26742c3b7d600abf7
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 11 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) 
modules/googleauth/test.php   5) Written 2008-2012 by schokokeks.org Hosting, namely
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) 
Bernd Wurst Umbenennung Google-Auth nac...

Bernd Wurst authored 11 years ago

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

Bernd Wurst authored 11 years ago

modules/googleauth/test.php  22) 
Bernd Wurst Umbenennung Google-Auth nac...

Bernd Wurst authored 11 years ago

modules/webmailtotp/test.php 23) $section='webmailtotp_overview';
modules/webmailtotp/test.php 24) title('Test der Zwei-Faktor-Anmeldung');
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 11 years ago

modules/googleauth/test.php  25) 
Bernd Wurst löschen der OTP-Authentifiz...

Bernd Wurst authored 11 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'];
Bernd Wurst Umbenennung Google-Auth nac...

Bernd Wurst authored 11 years ago

modules/webmailtotp/test.php 29)   $ga_code = $_REQUEST['totp_code'];
Bernd Wurst löschen der OTP-Authentifiz...

Bernd Wurst authored 11 years ago

modules/googleauth/test.php  30)   
Bernd Wurst Füge Masterdomain automatis...

Bernd Wurst authored 11 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) 
Bernd Wurst löschen der OTP-Authentifiz...

Bernd Wurst authored 11 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) 
Bernd Wurst blacklist für eingegebene C...

Bernd Wurst authored 11 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;
Bernd Wurst Umbenennung Google-Auth nac...

Bernd Wurst authored 11 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.');
Bernd Wurst löschen der OTP-Authentifiz...

Bernd Wurst authored 11 years ago

modules/googleauth/test.php  48)     $success = false;
modules/googleauth/test.php  49)   }
modules/googleauth/test.php  50) 
Bernd Wurst blacklist für eingegebene C...

Bernd Wurst authored 11 years ago

modules/googleauth/test.php  51) 
Bernd Wurst löschen der OTP-Authentifiz...

Bernd Wurst authored 11 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>');
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 11 years ago

modules/googleauth/test.php  60) } else {
Bernd Wurst löschen der OTP-Authentifiz...

Bernd Wurst authored 11 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>');
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 11 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>
Bernd Wurst Umbenennung Google-Auth nac...

Bernd Wurst authored 11 years ago

modules/webmailtotp/test.php 67) <p>Der aktuellste Einmal-Code: <input type="text" name="totp_code" /></p>
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 11 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) 
Bernd Wurst Umbenennung Google-Auth nac...

Bernd Wurst authored 11 years ago

modules/webmailtotp/test.php 71) output(html_form('webmailtotp_test', 'test', '', $form));