b17426615d6fbf6616254d73cd887cce9e0f560b
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php    1) <?php
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

modules/email/include/mailaccounts.php   2) /*
modules/email/include/mailaccounts.php   3) This file belongs to the Webinterface of schokokeks.org Hosting
modules/email/include/mailaccounts.php   4) 
Bernd Wurst Updated copyright notice (2...

Bernd Wurst authored 11 years ago

modules/email/include/mailaccounts.php   5) Written 2008-2013 by schokokeks.org Hosting, namely
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

modules/email/include/mailaccounts.php   6)   Bernd Wurst <bernd@schokokeks.org>
modules/email/include/mailaccounts.php   7)   Hanno Böck <hanno@schokokeks.org>
modules/email/include/mailaccounts.php   8) 
modules/email/include/mailaccounts.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/email/include/mailaccounts.php  10) 
modules/email/include/mailaccounts.php  11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
modules/email/include/mailaccounts.php  12) http://creativecommons.org/publicdomain/zero/1.0/
modules/email/include/mailaccounts.php  13) 
modules/email/include/mailaccounts.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/email/include/mailaccounts.php  15) */
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php   16) 
modules/imap/include/mailaccounts.php   17) require_once('inc/debug.php');
bernd Logging aktiviert

bernd authored 17 years ago

modules/imap/include/mailaccounts.php   18) require_once('inc/base.php');
bernd XSS/CSRF-Bugs behoben

bernd authored 17 years ago

modules/imap/include/mailaccounts.php   19) require_once('inc/security.php');
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php   20) 
bernd Domain-Klasse benutzen

bernd authored 17 years ago

modules/imap/include/mailaccounts.php   21) require_once('class/domain.php');
modules/imap/include/mailaccounts.php   22) 
bernd Alles in das email-modul ve...

bernd authored 16 years ago

modules/email/include/mailaccounts.php  23) require_once('common.php');
modules/email/include/mailaccounts.php  24) 
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php   25) function mailaccounts($uid)
modules/imap/include/mailaccounts.php   26) {
modules/imap/include/mailaccounts.php   27)   $uid = (int) $uid;
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php  28)   $result = db_query("SELECT m.id,concat_ws('@',`m`.`local`,if(isnull(`m`.`domain`),:masterdomain,`d`.`domainname`)) AS `account`, `m`.`password` AS `cryptpass`,`m`.`maildir` AS `maildir`,aktiv from (`mail`.`mailaccounts` `m` left join `mail`.`v_domains` `d` on((`d`.`id` = `m`.`domain`))) WHERE m.uid=:uid ORDER BY if(isnull(`m`.`domain`),:masterdomain,`d`.`domainname`), local", array(":masterdomain" => config("masterdomain"), ":uid" => $uid));
Bernd Wurst Umstellung auf PDO-Datenban...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php  29)   DEBUG("Found ".@$result->rowCount()." rows!");
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php   30)   $accounts = array();
Bernd Wurst Umstellung auf PDO-Datenban...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php  31)   if (@$result->rowCount() > 0)
modules/email/include/mailaccounts.php  32)     while ($acc = @$result->fetch(PDO::FETCH_OBJ))
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php   33)       array_push($accounts, array('id'=> $acc->id, 'account' => $acc->account, 'mailbox' => $acc->maildir, 'cryptpass' => $acc->cryptpass, 'enabled' => ($acc->aktiv == 1)));
modules/imap/include/mailaccounts.php   34)   return $accounts;
modules/imap/include/mailaccounts.php   35) }
modules/imap/include/mailaccounts.php   36) 
modules/imap/include/mailaccounts.php   37) function get_mailaccount($id)
modules/imap/include/mailaccounts.php   38) {
bernd Keine Domains => Dann auch...

bernd authored 15 years ago

modules/email/include/mailaccounts.php  39)   $id = (int) $id;
Bernd Wurst Löschen fremder Mailaccount...

Bernd Wurst authored 11 years ago

modules/email/include/mailaccounts.php  40)   $uid = (int) $_SESSION['userinfo']['uid'];
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php  41)   $result = db_query("SELECT concat_ws('@',`m`.`local`,if(isnull(`m`.`domain`),:masterdomain,`d`.`domainname`)) AS `account`, `m`.`password` AS `cryptpass`,`m`.`maildir` AS `maildir`,aktiv from (`mail`.`mailaccounts` `m` left join `mail`.`v_domains` `d` on((`d`.`id` = `m`.`domain`))) WHERE m.id=:mid AND m.uid=:uid", array(":masterdomain" => config("masterdomain"), ":uid" => $uid, ":mid" => $id));
Bernd Wurst Umstellung auf PDO-Datenban...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php  42)   DEBUG("Found ".$result->rowCount()." rows!");
modules/email/include/mailaccounts.php  43)   if ($result->rowCount() != 1)
bernd IMAP-Accounts deutlicher de...

bernd authored 15 years ago

modules/email/include/mailaccounts.php  44)     system_failure('Dieser Mailaccount existiert nicht oder gehört Ihnen nicht');
Bernd Wurst Umstellung auf PDO-Datenban...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php  45)   $acc = $result->fetch(PDO::FETCH_OBJ);
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php   46)   $ret = array('account' => $acc->account, 'mailbox' => $acc->maildir,  'enabled' => ($acc->aktiv == 1));
modules/imap/include/mailaccounts.php   47)   DEBUG(print_r($ret, true));
modules/imap/include/mailaccounts.php   48)   return $ret;
modules/imap/include/mailaccounts.php   49) }
modules/imap/include/mailaccounts.php   50) 
modules/imap/include/mailaccounts.php   51) function change_mailaccount($id, $arr)
modules/imap/include/mailaccounts.php   52) {
modules/imap/include/mailaccounts.php   53)   $id = (int) $id;
Bernd Wurst Löschen fremder Mailaccount...

Bernd Wurst authored 11 years ago

modules/email/include/mailaccounts.php  54)   $uid = (int) $_SESSION['userinfo']['uid'];
Bernd Wurst Bugfix: E-Mail-User konnte...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php  55)   $conditions = array();
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php  56)   $values = array(":id" => $id, ":uid" => $uid);
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php   57) 
modules/imap/include/mailaccounts.php   58)   if (isset($arr['account']))
modules/imap/include/mailaccounts.php   59)   {
modules/imap/include/mailaccounts.php   60)     list($local, $domain) = explode('@', $arr['account'], 2);
bernd Erlaube @schokokeks.org-IMAP

bernd authored 15 years ago

modules/email/include/mailaccounts.php  61)     if ($domain == config('masterdomain'))
modules/email/include/mailaccounts.php  62)     {
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php  63)       $values[':domain'] = NULL;
bernd Erlaube @schokokeks.org-IMAP

bernd authored 15 years ago

modules/email/include/mailaccounts.php  64)     }
bernd Domain-Klasse benutzen

bernd authored 17 years ago

modules/imap/include/mailaccounts.php   65)     else
bernd Sicherstellen, dass die Dom...

bernd authored 15 years ago

modules/email/include/mailaccounts.php  66)     {
bernd Erlaube @schokokeks.org-IMAP

bernd authored 15 years ago

modules/email/include/mailaccounts.php  67)       $domain = new Domain( (string) $domain);
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php  68)       if ($domain->id == NULL) {
modules/email/include/mailaccounts.php  69)         $values[":domain"] = NULL;
modules/email/include/mailaccounts.php  70)       } else {
bernd Erlaube @schokokeks.org-IMAP

bernd authored 15 years ago

modules/email/include/mailaccounts.php  71)         $domain->ensure_userdomain();
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php  72)         $values[":domain"] = $domain->id;
bernd Erlaube @schokokeks.org-IMAP

bernd authored 15 years ago

modules/email/include/mailaccounts.php  73)       }
bernd Sicherstellen, dass die Dom...

bernd authored 15 years ago

modules/email/include/mailaccounts.php  74)     }
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php  75)     $values[":local"] = $local;
Bernd Wurst Bugfix: E-Mail-User konnte...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php  76)     $conditions[] = "local=:local";
modules/email/include/mailaccounts.php  77)     $conditions[] = "domain=:domain";
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php   78)   }
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php  79)   if (isset($arr['mailbox'])) {
modules/email/include/mailaccounts.php  80)     array_push($conditions, "`maildir`=:maildir");
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php   81)     if ($arr['mailbox'] == '')
Bernd Wurst Weitere Umstellungen auf pr...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php  82)       $values[":maildir"] = NULL;
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php   83)     else
Bernd Wurst Weitere Umstellungen auf pr...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php  84)       $values[":maildir"] = $arr['mailbox'];
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php  85)   }
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php   86) 
modules/imap/include/mailaccounts.php   87)   if (isset($arr['password']))
modules/imap/include/mailaccounts.php   88)   {
modules/imap/include/mailaccounts.php   89)     $encpw = encrypt_mail_password($arr['password']);
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php  90)     array_push($conditions, "`password`=:password");
modules/email/include/mailaccounts.php  91)     $values[":password"] = $encpw;
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php   92)   }
modules/imap/include/mailaccounts.php   93) 
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php  94)   if (isset($arr['enabled'])) {
modules/email/include/mailaccounts.php  95)     array_push($conditions, "`aktiv`=:aktiv");
modules/email/include/mailaccounts.php  96)     $values[":aktiv"] = ($arr['enabled'] == 'Y' ? 1 : 0);
modules/email/include/mailaccounts.php  97)   }
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php   98) 
modules/imap/include/mailaccounts.php   99) 
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php 100)   db_query("UPDATE mail.mailaccounts SET ".implode(",", $conditions)." WHERE id=:id AND uid=:uid", $values);
Bernd Wurst Bugfix: E-Mail-User konnte...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php 101)   logger(LOG_INFO, "modules/imap/include/mailaccounts", "imap", "updated account »{$id}«");
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  102) 
modules/imap/include/mailaccounts.php  103) }
modules/imap/include/mailaccounts.php  104) 
modules/imap/include/mailaccounts.php  105) function create_mailaccount($arr)
modules/imap/include/mailaccounts.php  106) {
modules/imap/include/mailaccounts.php  107)   $values = array();
modules/imap/include/mailaccounts.php  108) 
modules/imap/include/mailaccounts.php  109)   if (($arr['account']) == '')
modules/imap/include/mailaccounts.php  110)     system_failure('empty account name!');
modules/imap/include/mailaccounts.php  111) 
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php 112)   $values[':uid'] = (int) $_SESSION['userinfo']['uid'];
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  113) 
modules/imap/include/mailaccounts.php  114)   list($local, $domain) = explode('@', $arr['account'], 2);
bernd Erlaube wieder @schokokeks....

bernd authored 15 years ago

modules/email/include/mailaccounts.php 115)   if ($domain == config('masterdomain'))
modules/email/include/mailaccounts.php 116)   {
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php 117)     $values[':domain'] = NULL;
bernd Erlaube wieder @schokokeks....

bernd authored 15 years ago

modules/email/include/mailaccounts.php 118)   }
modules/email/include/mailaccounts.php 119)   else
modules/email/include/mailaccounts.php 120)   {
modules/email/include/mailaccounts.php 121)     $domain = new Domain( (string) $domain);
modules/email/include/mailaccounts.php 122)     if ($domain->id == NULL)
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php 123)       $values[':domain'] = NULL;
bernd Erlaube wieder @schokokeks....

bernd authored 15 years ago

modules/email/include/mailaccounts.php 124)     else {
modules/email/include/mailaccounts.php 125)       $domain->ensure_userdomain();
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php 126)       $values[':domain'] = $domain->id;
bernd Erlaube wieder @schokokeks....

bernd authored 15 years ago

modules/email/include/mailaccounts.php 127)     }
bernd Sicherstellen, dass die Dom...

bernd authored 15 years ago

modules/email/include/mailaccounts.php 128)   }
bernd Domain-Klasse benutzen

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  129) 
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php 130)   $values[':local'] = $local;
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  131) 
modules/imap/include/mailaccounts.php  132)   if (isset($arr['mailbox']))
modules/imap/include/mailaccounts.php  133)     if ($arr['mailbox'] == '')
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php 134)       $values[':maildir'] = NULL;
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  135)     else
Bernd Wurst Weitere Umstellungen auf pr...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php 136)       $values[':maildir'] = $arr['mailbox'];
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  137) 
modules/imap/include/mailaccounts.php  138) 
modules/imap/include/mailaccounts.php  139)   if (isset($arr['password']))
modules/imap/include/mailaccounts.php  140)   {
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php 141)     $values[':password'] = encrypt_mail_password($arr['password']);
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  142)   }
modules/imap/include/mailaccounts.php  143) 
modules/imap/include/mailaccounts.php  144)   if (isset($arr['enabled']))
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php 145)     $values[':aktiv'] = ($arr['enabled'] == 'Y' ? 1 : 0 );
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  146) 
modules/imap/include/mailaccounts.php  147) 
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php 148)   $fields = array_map( function ($k) { return substr($k, 1);}, array_keys($values));
modules/email/include/mailaccounts.php 149)   db_query("INSERT INTO mail.mailaccounts (".implode(',', $fields).") VALUES (".implode(",", array_keys($values)).")", $values);
bernd Logger mit Logleveln

bernd authored 15 years ago

modules/email/include/mailaccounts.php 150)   logger(LOG_INFO, "modules/imap/include/mailaccounts", "imap", "created account »{$arr['account']}«");
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  151) 
modules/imap/include/mailaccounts.php  152) }
modules/imap/include/mailaccounts.php  153) 
bernd Auch mailaccounts können si...

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  154)     
modules/imap/include/mailaccounts.php  155) function get_mailaccount_id($accountname)
modules/imap/include/mailaccounts.php  156) {
modules/imap/include/mailaccounts.php  157)   list($local, $domain) = explode('@', $accountname, 2);
modules/imap/include/mailaccounts.php  158) 
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php 159)   $args = array(":local" => $local,
modules/email/include/mailaccounts.php 160)                 ":domain" => $domain);
bernd Auch mailaccounts können si...

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  161) 
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php 162)   $result = db_query("SELECT acc.id FROM mail.mailaccounts AS acc LEFT JOIN mail.v_domains AS dom ON (dom.id=acc.domain) WHERE local=:local AND dom.domainname=:domain", $args);
Bernd Wurst Umstellung auf PDO-Datenban...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php 163)   if ($result->rowCount() != 1)
bernd Auch mailaccounts können si...

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  164)     system_failure('account nicht eindeutig');
Bernd Wurst Umstellung auf PDO-Datenban...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php 165)   $acc = $result->fetch();
bernd Auch mailaccounts können si...

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  166)   return $acc['id'];
modules/imap/include/mailaccounts.php  167) }
modules/imap/include/mailaccounts.php  168)     
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  169) 
modules/imap/include/mailaccounts.php  170) function delete_mailaccount($id)
modules/imap/include/mailaccounts.php  171) {
modules/imap/include/mailaccounts.php  172)   $id = (int) $id;
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php 173)   db_query("DELETE FROM mail.mailaccounts WHERE id=?", array($id));
bernd Logger mit Logleveln

bernd authored 15 years ago

modules/email/include/mailaccounts.php 174)   logger(LOG_INFO, "modules/imap/include/mailaccounts", "imap", "deleted account »{$id}«");
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  175) }
modules/imap/include/mailaccounts.php  176) 
modules/imap/include/mailaccounts.php  177) 
modules/imap/include/mailaccounts.php  178) function check_valid($acc)
modules/imap/include/mailaccounts.php  179) {
modules/imap/include/mailaccounts.php  180)   $user = $_SESSION['userinfo'];
modules/imap/include/mailaccounts.php  181)   DEBUG("Account-data: ".print_r($acc, true));
modules/imap/include/mailaccounts.php  182)   DEBUG("User-data: ".print_r($user, true));
modules/imap/include/mailaccounts.php  183)   if ($acc['mailbox'] != '')
modules/imap/include/mailaccounts.php  184)   {
modules/imap/include/mailaccounts.php  185)     if (substr($acc['mailbox'], 0, strlen($user['homedir'])+1) != $user['homedir'].'/')
bernd XSS/CSRF-Bugs behoben

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  186)       return "Die Mailbox muss innerhalb des Home-Verzeichnisses liegen. Sie haben »".$acc['mailbox']."« als Mailbox angegeben, Ihr Home-Verzeichnis ist »".$user['homedir']."/«.";
modules/imap/include/mailaccounts.php  187)     if (! check_path($acc['mailbox']))
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  188)       return "Sie verwenden ungültige Zeichen in Ihrem Mailbox-Pfad.";
modules/imap/include/mailaccounts.php  189)   }
modules/imap/include/mailaccounts.php  190) 
modules/imap/include/mailaccounts.php  191)   if ($acc['account'] == '' || strpos($acc['account'], '@') == 0)
modules/imap/include/mailaccounts.php  192)     return "Es wurde kein Benutzername angegeben!";
modules/imap/include/mailaccounts.php  193)   if (strpos($acc['account'], '@') === false)
bernd Einige Dummheiten repariert...

bernd authored 15 years ago

modules/email/include/mailaccounts.php 194)     return "Es wurde kein Domain-Teil im Account-Name angegeben. Account-Namen müssen einen Domain-Teil enthalten. Im Zweifel versuchen Sie »@".config('masterdomain')."«.";
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  195) 
modules/imap/include/mailaccounts.php  196)   list($local, $domain) = explode('@', $acc['account'], 2);
hanno Hatte die Kompatibilität ge...

hanno authored 17 years ago

modules/imap/include/mailaccounts.php  197)   verify_input_username($local);
bernd Domain-Klasse benutzen

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  198)   $tmpdomains = get_domain_list($user['customerno'], $user['uid']);
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  199)   $domains = array();
modules/imap/include/mailaccounts.php  200)   foreach ($tmpdomains as $dom)
bernd Domain-Klasse benutzen

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  201)     $domains[] = $dom->fqdn;
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  202) 
modules/imap/include/mailaccounts.php  203)   if (array_search($domain, $domains) === false)
modules/imap/include/mailaccounts.php  204)   {
bernd Mehr config-optionen und co...

bernd authored 15 years ago

modules/email/include/mailaccounts.php 205)     if ($domain == config('masterdomain'))
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  206)     {
modules/imap/include/mailaccounts.php  207)       if (substr($local, 0, strlen($user['username'])) != $user['username'] || ($acc['account'][strlen($user['username'])] != '-' && $acc['account'][strlen($user['username'])] != '@'))
modules/imap/include/mailaccounts.php  208)       {
bernd Einige Dummheiten repariert...

bernd authored 15 years ago

modules/email/include/mailaccounts.php 209)         return "Sie haben »@".config('masterdomain')."« als Domain-Teil angegeben, aber der Benutzer-Teil beginnt nicht mit Ihrem Benutzername!";
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  210)       }
modules/imap/include/mailaccounts.php  211)     }
modules/imap/include/mailaccounts.php  212)     else
bernd XSS/CSRF-Bugs behoben

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  213)       return "Der angegebene Domain-Teil (»".htmlentities($domain, ENT_QUOTES, "UTF-8")."«) ist nicht für Ihren Account eingetragen. Sollte dies ein Fehler sein, wenden sie sich bitte an einen Administrator!";
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/include/mailaccounts.php  214)   }
modules/imap/include/mailaccounts.php  215) 
modules/imap/include/mailaccounts.php  216)   return '';
modules/imap/include/mailaccounts.php  217) }
modules/imap/include/mailaccounts.php  218) 
modules/imap/include/mailaccounts.php  219) 
bernd IMAP-Accounts deutlicher de...

bernd authored 15 years ago

modules/email/include/mailaccounts.php 220) function imap_on_vmail_domain()
modules/email/include/mailaccounts.php 221) {
modules/email/include/mailaccounts.php 222)   $uid = (int) $_SESSION['userinfo']['uid'];
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php 223)   $result = db_query("SELECT m.id FROM mail.mailaccounts AS m INNER JOIN mail.virtual_mail_domains AS vd USING (domain) WHERE m.uid=?", array($uid));
Bernd Wurst Umstellung auf PDO-Datenban...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php 224)   if ($result->rowCount() > 0)
bernd IMAP-Accounts deutlicher de...

bernd authored 15 years ago

modules/email/include/mailaccounts.php 225)     return true;
modules/email/include/mailaccounts.php 226)   return false;
modules/email/include/mailaccounts.php 227) }
modules/email/include/mailaccounts.php 228) 
modules/email/include/mailaccounts.php 229) function user_has_only_vmail_domains()
modules/email/include/mailaccounts.php 230) {
modules/email/include/mailaccounts.php 231)   $uid = (int) $_SESSION['userinfo']['uid'];
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php 232)   $result = db_query("SELECT id FROM mail.v_vmail_domains WHERE useraccount=?", array($uid));
bernd Keine Domains => Dann auch...

bernd authored 15 years ago

modules/email/include/mailaccounts.php 233)   // User hat keine VMail-Domains
Bernd Wurst Umstellung auf PDO-Datenban...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php 234)   if ($result->rowCount() == 0)
bernd Keine Domains => Dann auch...

bernd authored 15 years ago

modules/email/include/mailaccounts.php 235)     return false;
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php 236)   $result = db_query("SELECT d.id FROM mail.v_domains AS d LEFT JOIN mail.v_vmail_domains AS vd USING (domainname) WHERE vd.id IS NULL AND d.user=?", array($uid));
bernd Keine Domains => Dann auch...

bernd authored 15 years ago

modules/email/include/mailaccounts.php 237)   // User hat keine Domains die nicht vmail-Domains sind
Bernd Wurst Umstellung auf PDO-Datenban...

Bernd Wurst authored 10 years ago

modules/email/include/mailaccounts.php 238)   if ($result->rowCount() == 0)
bernd IMAP-Accounts deutlicher de...

bernd authored 15 years ago

modules/email/include/mailaccounts.php 239)     return true;
modules/email/include/mailaccounts.php 240)   return false;
modules/email/include/mailaccounts.php 241) }
modules/email/include/mailaccounts.php 242) 
modules/email/include/mailaccounts.php 243)