Bernd Wurst commited on 2012-09-19 11:21:23
Zeige 3 geänderte Dateien mit 18 Einfügungen und 4 Löschungen.
| ... | ... |
@@ -37,6 +37,10 @@ us what you're going to do with this code. |
| 37 | 37 |
|
| 38 | 38 |
<h3>Lizenzinformationen</h3> |
| 39 | 39 |
<p>Dieses Webinterface ist eine Eigenentwicklung von schokokeks.org Webhosting. Der Source-Code ist unter <a href="http://source.schokokeks.org/">source.schokokeks.org</a> erhältlich und wurde unter der Lizenz CC0 / Public Domain freigegeben.</p> |
| 40 |
+<p>Folgende Bestandteile wurden von anderen Autoren übernommen und unterliegen einer abweichenden Lizenz:</p> |
|
| 41 |
+<ul> |
|
| 42 |
+ <li>Eine <a href="https://github.com/PHPGangsta/GoogleAuthenticator">Bibliothek zur Abwicklung der Google-Authenticator-Anmeldung</a> wurde von <a href="http://www.phpgangsta.de/2-faktor-authentifizierung-mit-dem-google-authenticator">Michael Kliewe (PHPGangsta)</a> übernommen und ist unter der BSD-Lizenz freigegeben</li> |
|
| 43 |
+</ul> |
|
| 40 | 44 |
<p>Einzelne Grafiken wurden aus freien Projekten entnommen oder es wurden freie Grafiken verwendet.</p> |
| 41 | 45 |
<p>Der Ursprung von Grafiken ist:</p> |
| 42 | 46 |
<ul> |
| ... | ... |
@@ -86,8 +86,7 @@ function decode_webmail_password($crypted, $webmailpw) |
| 86 | 86 |
} |
| 87 | 87 |
|
| 88 | 88 |
|
| 89 |
-function check_webmail_password($username, $webmailpass) |
|
| 90 |
-{
|
|
| 89 |
+function get_imap_password($username, $webmailpass) {
|
|
| 91 | 90 |
$username = mysql_real_escape_string($username); |
| 92 | 91 |
$result = db_query("SELECT webmailpass FROM mail.webmail_googleauth WHERE email='{$username}'");
|
| 93 | 92 |
$tmp = mysql_fetch_assoc($result); |
| ... | ... |
@@ -95,9 +94,14 @@ function check_webmail_password($username, $webmailpass) |
| 95 | 94 |
$crypted = $tmp['webmailpass']; |
| 96 | 95 |
|
| 97 | 96 |
$clear = decode_webmail_password($crypted, $webmailpass); |
| 97 |
+ return $clear; |
|
| 98 |
+} |
|
| 98 | 99 |
|
| 99 |
- return validate_password($username, $clear); |
|
| 100 | 100 |
|
| 101 |
+function check_webmail_password($username, $webmailpass) |
|
| 102 |
+{
|
|
| 103 |
+ $clear = get_imap_password($username, $webmailpass); |
|
| 104 |
+ return validate_password($username, $clear); |
|
| 101 | 105 |
} |
| 102 | 106 |
|
| 103 | 107 |
|
| ... | ... |
@@ -95,7 +95,13 @@ if (count($sorted_by_domains) > 0) {
|
| 95 | 95 |
foreach ($accounts AS $acc) {
|
| 96 | 96 |
if ($acc['mailbox']) {
|
| 97 | 97 |
output('<div style="margin-left: 2em;"><p style="margin-left: -2em;"><strong>'.$acc['account'].'</strong></p>');
|
| 98 |
- output(addnew('setup', 'Sicheren Zugang für dieses Postfach aktivieren', 'username='.urlencode($acc['account'])));
|
|
| 98 |
+ $username = $acc['account']; |
|
| 99 |
+ $id = account_has_googleauth($username); |
|
| 100 |
+ if ($id) {
|
|
| 101 |
+ output(addnew('delete', 'Sicheren Zugang für dieses Postfach abschalten', 'id='.$id, 'style="background-image: url('.$prefix.'images/delete.png); color: red;"'));
|
|
| 102 |
+ } else {
|
|
| 103 |
+ output(addnew('setup', 'Sicheren Zugang für dieses Postfach aktivieren', 'username='.urlencode($username)));
|
|
| 104 |
+ } |
|
| 99 | 105 |
output('</div>');
|
| 100 | 106 |
} |
| 101 | 107 |
} |
| 102 | 108 |