96649f21ba18d07757afa9d98998f7a22c0d86a3
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php   1) <?php
modules/googleauth/include/googleauth.php   2) /*
modules/googleauth/include/googleauth.php   3) This file belongs to the Webinterface of schokokeks.org Hosting
modules/googleauth/include/googleauth.php   4) 
Bernd Wurst Copyright year update

Bernd Wurst authored 6 years ago

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

Bernd Wurst authored 12 years ago

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

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php       11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php  12) http://creativecommons.org/publicdomain/zero/1.0/
modules/googleauth/include/googleauth.php  13) 
modules/googleauth/include/googleauth.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/include/googleauth.php  15) */
modules/googleauth/include/googleauth.php  16) 
Hanno Use GoogleAuthenticator fro...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php       17) require_once('vendor/autoload.php');
modules/webmailtotp/include/totp.php       18) 
Bernd Wurst Umbenennung Google-Auth nac...

Bernd Wurst authored 12 years ago

modules/webmailtotp/include/totp.php       19) function account_has_totp($username)
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php  20) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/webmailtotp/include/totp.php       21)     $result = db_query("SELECT id FROM mail.webmail_totp WHERE email=?", [$username]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php       22)     if ($result->rowCount() > 0) {
modules/webmailtotp/include/totp.php       23)         $tmp = $result->fetch();
modules/webmailtotp/include/totp.php       24)         $id = $tmp['id'];
modules/webmailtotp/include/totp.php       25)         return $id;
modules/webmailtotp/include/totp.php       26)     } else {
modules/webmailtotp/include/totp.php       27)         return false;
modules/webmailtotp/include/totp.php       28)     }
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php  29) }
modules/googleauth/include/googleauth.php  30) 
modules/googleauth/include/googleauth.php  31) 
modules/googleauth/include/googleauth.php  32) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php       33) function validate_password($username, $password)
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 12 years ago

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

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php       35)     $args[":username"] = $username;
modules/webmailtotp/include/totp.php       36)     $result = db_query("SELECT account, cryptpass FROM mail.courier_mailaccounts WHERE account=:username UNION SELECT account, cryptpass FROM mail.courier_virtual_accounts WHERE account=:username", $args);
modules/webmailtotp/include/totp.php       37)     if ($result->rowCount() != 1) {
modules/webmailtotp/include/totp.php       38)         // Kein Account mit dem Namen oder Name nicht eindeutig
modules/webmailtotp/include/totp.php       39)         return false;
modules/webmailtotp/include/totp.php       40)     }
modules/webmailtotp/include/totp.php       41)     $account = $result->fetch();
modules/webmailtotp/include/totp.php       42)     return (crypt($password, $account['cryptpass']) == $account['cryptpass']);
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php  43) }
modules/googleauth/include/googleauth.php  44) 
modules/googleauth/include/googleauth.php  45) 
modules/googleauth/include/googleauth.php  46) function store_webmail_password($username, $oldpw, $newpw)
modules/googleauth/include/googleauth.php  47) {
Bernd Wurst allow setup of 2FA when log...

Bernd Wurst authored 4 years ago

modules/webmailtotp/include/totp.php       48)     $qual = strong_password($newpw);
modules/webmailtotp/include/totp.php       49)     if ($qual !== true) {
modules/webmailtotp/include/totp.php       50)         system_failure('Fehler beim Webmail-Passwort: '.$qual);
modules/webmailtotp/include/totp.php       51)     }
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php       52)     $secret = $newpw;
modules/webmailtotp/include/totp.php       53)     if (strlen($oldpw) > strlen($newpw)) {
modules/webmailtotp/include/totp.php       54)         $secret = str_pad($newpw, strlen($oldpw), $newpw);
modules/webmailtotp/include/totp.php       55)     }
modules/webmailtotp/include/totp.php       56)     if (strlen($oldpw) < strlen($newpw)) {
modules/webmailtotp/include/totp.php       57)         $newpw = substr($newpw, 0, strlen($oldpw));
modules/webmailtotp/include/totp.php       58)     }
modules/webmailtotp/include/totp.php       59)     if (strlen($oldpw) != strlen($secret)) {
modules/webmailtotp/include/totp.php       60)         system_failure('Interner Fehler: Passwörter sind nicht gleich lang');
modules/webmailtotp/include/totp.php       61)     }
modules/webmailtotp/include/totp.php       62)     $code = '';
modules/webmailtotp/include/totp.php       63)     for ($i = 0 ; $i != strlen($oldpw) ; $i++) {
modules/webmailtotp/include/totp.php       64)         $code .= chr(ord($oldpw[$i]) ^ ord($secret[$i]));
modules/webmailtotp/include/totp.php       65)     }
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/webmailtotp/include/totp.php       66)     DEBUG([$oldpw, $newpw]);
modules/webmailtotp/include/totp.php       67)     $args = [":uid" => $_SESSION['userinfo']['uid'],
Bernd Wurst Weitere Umstellungen auf pr...

Bernd Wurst authored 10 years ago

modules/webmailtotp/include/totp.php       68)                 ":username" => $username,
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/webmailtotp/include/totp.php       69)                 ":code" => base64_encode($code), ];
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php  70) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php       71)     db_query("REPLACE INTO mail.webmail_totp (useraccount, email, webmailpass) VALUES (:uid, :username, :code)", $args);
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php  72) }
modules/googleauth/include/googleauth.php  73) 
modules/googleauth/include/googleauth.php  74) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php       75) function decode_webmail_password($crypted, $webmailpw)
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 12 years ago

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

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php       77)     $crypted = base64_decode($crypted);
modules/webmailtotp/include/totp.php       78)     $secret = $webmailpw;
modules/webmailtotp/include/totp.php       79)     if (strlen($crypted) > strlen($webmailpw)) {
modules/webmailtotp/include/totp.php       80)         $secret = str_pad($webmailpw, strlen($crypted), $webmailpw);
modules/webmailtotp/include/totp.php       81)     }
modules/webmailtotp/include/totp.php       82)     if (strlen($crypted) < strlen($webmailpw)) {
modules/webmailtotp/include/totp.php       83)         $webmailpw = substr($webmailpw, 0, strlen($crypted));
modules/webmailtotp/include/totp.php       84)     }
modules/webmailtotp/include/totp.php       85)     $clear = '';
modules/webmailtotp/include/totp.php       86)     for ($i = 0 ; $i != strlen($crypted) ; $i++) {
modules/webmailtotp/include/totp.php       87)         $clear .= chr(ord($crypted[$i]) ^ ord($secret[$i]));
modules/webmailtotp/include/totp.php       88)     }
modules/webmailtotp/include/totp.php       89)     DEBUG('decrypted: '.$clear);
modules/webmailtotp/include/totp.php       90)     return $clear;
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php  91) }
modules/googleauth/include/googleauth.php  92) 
modules/googleauth/include/googleauth.php  93) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php       94) function get_imap_password($username, $webmailpass)
modules/webmailtotp/include/totp.php       95) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/webmailtotp/include/totp.php       96)     $result = db_query("SELECT webmailpass FROM mail.webmail_totp WHERE email=?", [$username]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php       97)     $tmp = $result->fetch();
Hanno remove whitespace in empty...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php       98) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php       99)     $crypted = $tmp['webmailpass'];
Hanno remove whitespace in empty...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      100) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      101)     $clear = decode_webmail_password($crypted, $webmailpass);
modules/webmailtotp/include/totp.php      102)     return $clear;
Bernd Wurst Attribution für die externe...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php 103) }
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php 104) 
Bernd Wurst Attribution für die externe...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php 105) 
modules/googleauth/include/googleauth.php 106) function check_webmail_password($username, $webmailpass)
modules/googleauth/include/googleauth.php 107) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      108)     $clear = get_imap_password($username, $webmailpass);
modules/webmailtotp/include/totp.php      109)     return validate_password($username, $clear);
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php 110) }
modules/googleauth/include/googleauth.php 111) 
modules/googleauth/include/googleauth.php 112) 
modules/googleauth/include/googleauth.php 113) function generate_secret($username)
modules/googleauth/include/googleauth.php 114) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      115)     $ga = new PHPGangsta_GoogleAuthenticator();
Hanno remove whitespace in empty...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      116) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      117)     $secret = $ga->createSecret();
modules/webmailtotp/include/totp.php      118)     DEBUG('GA-Secret: '.$secret);
modules/webmailtotp/include/totp.php      119)     DEBUG('QrCode: '.$ga->getQRCodeGoogleUrl('Blog', $secret));
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/webmailtotp/include/totp.php      120)     $args = [":secret" => $secret, ":username" => $username];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      121)     db_query("UPDATE mail.webmail_totp SET totp_secret=:secret WHERE email=:username", $args);
modules/webmailtotp/include/totp.php      122)     return $secret;
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php 123) }
modules/googleauth/include/googleauth.php 124) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      125) function check_locked($username)
Bernd Wurst blacklist für eingegebene C...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php 126) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/webmailtotp/include/totp.php      127)     $result = db_query("SELECT 1 FROM mail.webmail_totp WHERE unlock_timestamp IS NOT NULL and unlock_timestamp > NOW() AND email=?", [$username]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      128)     return ($result->rowCount() > 0);
Bernd Wurst blacklist für eingegebene C...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php 129) }
modules/googleauth/include/googleauth.php 130) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      131) function check_totp($username, $code)
modules/webmailtotp/include/totp.php      132) {
modules/webmailtotp/include/totp.php      133)     if (check_blacklist($username, $code)) {
modules/webmailtotp/include/totp.php      134)         DEBUG('Replay-Attack');
modules/webmailtotp/include/totp.php      135)         return false;
modules/webmailtotp/include/totp.php      136)     }
Bernd Wurst blacklist für eingegebene C...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php 137) 
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/webmailtotp/include/totp.php      138)     $result = db_query("SELECT totp_secret, failures FROM mail.webmail_totp WHERE email=? AND (unlock_timestamp IS NULL OR unlock_timestamp <= NOW())", [$username]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      139)     $tmp = $result->fetch();
modules/webmailtotp/include/totp.php      140)     $secret = $tmp['totp_secret'];
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php 141) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      142)     $ga = new PHPGangsta_GoogleAuthenticator();
Hanno remove whitespace in empty...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      143) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      144)     $checkResult = $ga->verifyCode($secret, $code, 2);    // 2 = 2*30sec clock tolerance
modules/webmailtotp/include/totp.php      145)     if ($checkResult) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/webmailtotp/include/totp.php      146)         db_query("UPDATE mail.webmail_totp SET failures = 0, unlock_timestamp=NULL WHERE email=?", [$username]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      147)         blacklist_token($username, $code);
modules/webmailtotp/include/totp.php      148)         DEBUG('OK');
Bernd Wurst löschen der OTP-Authentifiz...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php 149)     } else {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      150)         if ($tmp['failures'] > 0 && $tmp['failures'] % 5 == 0) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/webmailtotp/include/totp.php      151)             db_query("UPDATE mail.webmail_totp SET failures = failures+1, unlock_timestamp = NOW() + INTERVAL 5 MINUTE WHERE email=?", [$username]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      152)         } else {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/webmailtotp/include/totp.php      153)             db_query("UPDATE mail.webmail_totp SET failures = failures+1 WHERE email=?", [$username]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      154)         }
Hanno remove whitespace in empty...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      155) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      156)         DEBUG('FAILED');
modules/webmailtotp/include/totp.php      157)     }
modules/webmailtotp/include/totp.php      158)     return $checkResult;
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php 159) }
modules/googleauth/include/googleauth.php 160) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      161) function generate_qrcode_image($secret)
modules/webmailtotp/include/totp.php      162) {
modules/webmailtotp/include/totp.php      163)     $url = 'otpauth://totp/Webmail?secret='.$secret;
Hanno remove whitespace in empty...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      164) 
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/webmailtotp/include/totp.php      165)     $descriptorspec = [
modules/webmailtotp/include/totp.php      166)     0 => ["pipe", "r"],  // STDIN ist eine Pipe, von der das Child liest
modules/webmailtotp/include/totp.php      167)     1 => ["pipe", "w"],  // STDOUT ist eine Pipe, in die das Child schreibt
modules/webmailtotp/include/totp.php      168)     2 => ["pipe", "w"],
modules/webmailtotp/include/totp.php      169)   ];
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php 170) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      171)     $process = proc_open('qrencode -t PNG -s 5 -o -', $descriptorspec, $pipes);
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php 172) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      173)     if (is_resource($process)) {
modules/webmailtotp/include/totp.php      174)         // $pipes sieht nun so aus:
modules/webmailtotp/include/totp.php      175)         // 0 => Schreibhandle, das auf das Child STDIN verbunden ist
modules/webmailtotp/include/totp.php      176)         // 1 => Lesehandle, das auf das Child STDOUT verbunden ist
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php 177) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      178)         fwrite($pipes[0], $url);
modules/webmailtotp/include/totp.php      179)         fclose($pipes[0]);
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php 180) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      181)         $pngdata = stream_get_contents($pipes[1]);
modules/webmailtotp/include/totp.php      182)         fclose($pipes[1]);
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php 183) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      184)         // Es ist wichtig, dass Sie alle Pipes schließen bevor Sie
modules/webmailtotp/include/totp.php      185)         // proc_close aufrufen, um Deadlocks zu vermeiden
modules/webmailtotp/include/totp.php      186)         $return_value = proc_close($process);
Hanno remove whitespace in empty...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      187) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      188)         return $pngdata;
modules/webmailtotp/include/totp.php      189)     } else {
modules/webmailtotp/include/totp.php      190)         warning('Es ist ein interner Fehler im Webinterface aufgetreten, aufgrund dessen kein QR-Code erstellt werden kann. Sollte dieser Fehler mehrfach auftreten, kontaktieren Sie bitte die Administratoren.');
modules/webmailtotp/include/totp.php      191)     }
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php 192) }
modules/googleauth/include/googleauth.php 193) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      194) function accountname($id)
Bernd Wurst löschen der OTP-Authentifiz...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php 195) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/webmailtotp/include/totp.php      196)     $args = [":id" => $id,
modules/webmailtotp/include/totp.php      197)                 ":uid" => $_SESSION['userinfo']['uid'], ];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      198)     $result = db_query("SELECT email FROM mail.webmail_totp WHERE id=:id AND useraccount=:uid", $args);
modules/webmailtotp/include/totp.php      199)     if ($tmp = $result->fetch()) {
modules/webmailtotp/include/totp.php      200)         return $tmp['email'];
modules/webmailtotp/include/totp.php      201)     }
Bernd Wurst löschen der OTP-Authentifiz...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php 202) }
modules/googleauth/include/googleauth.php 203) 
modules/googleauth/include/googleauth.php 204) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      205) function delete_totp($id)
Bernd Wurst löschen der OTP-Authentifiz...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php 206) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/webmailtotp/include/totp.php      207)     $args = [":id" => $id,
modules/webmailtotp/include/totp.php      208)                 ":uid" => $_SESSION['userinfo']['uid'], ];
Hanno remove whitespace in empty...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      209) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      210)     db_query("DELETE FROM mail.webmail_totp WHERE id=:id AND useraccount=:uid", $args);
Bernd Wurst löschen der OTP-Authentifiz...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php 211) }
modules/googleauth/include/googleauth.php 212) 
Bernd Wurst blacklist für eingegebene C...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php 213) 
modules/googleauth/include/googleauth.php 214) function blacklist_token($email, $token)
modules/googleauth/include/googleauth.php 215) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/webmailtotp/include/totp.php      216)     $args = [":email" => $email, ":token" => $token];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      217)     db_query("INSERT INTO mail.webmail_totp_blacklist (timestamp, email, token) VALUES (NOW(), :email, :token)", $args);
Bernd Wurst blacklist für eingegebene C...

Bernd Wurst authored 12 years ago

modules/googleauth/include/googleauth.php 218) }
modules/googleauth/include/googleauth.php 219) 
modules/googleauth/include/googleauth.php 220) function check_blacklist($email, $token)
modules/googleauth/include/googleauth.php 221) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/webmailtotp/include/totp.php      222)     $args = [":email" => $email, ":token" => $token];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/webmailtotp/include/totp.php      223)     db_query("DELETE FROM mail.webmail_totp_blacklist WHERE timestamp < NOW() - INTERVAL 10 MINUTE");
modules/webmailtotp/include/totp.php      224)     $result = db_query("SELECT id FROM mail.webmail_totp_blacklist WHERE email=:email AND token=:token", $args);
modules/webmailtotp/include/totp.php      225)     return ($result->rowCount() > 0);