Projects
Kolab:3.4
roundcubemail-plugins-kolab
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 35
View file
roundcubemail-plugins-kolab.spec
Changed
@@ -23,7 +23,7 @@ %global roundcube_lib %{_var}/lib/roundcubemail Name: roundcubemail-plugins-kolab -Version: 3.1.10 +Version: 3.1.11 Release: 1%{?dist} Summary: Kolab Groupware plugins for Roundcube Webmail @@ -209,6 +209,9 @@ %attr(0770,root,%{httpd_group}) %{roundcube_lib}/plugins/odfviewer %changelog +* Tue Jan 28 2014 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 3.1.11-1 +- New upstream version + * Thu Jan 9 2014 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 3.1.10-1 - New upstream version
View file
debian.changelog
Changed
@@ -1,3 +1,9 @@ +roundcubemail-plugins-kolab (1:3.1.11-0~kolab1) unstable; urgency=low + + * New upstream release + + -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Tue, 28 Jan 2014 18:41:13 +0200 + roundcubemail-plugins-kolab (1:3.1.10-0~kolab1) unstable; urgency=low * New upstream release
View file
roundcubemail-plugins-kolab-3.1.10.tar.gz/plugins/kolab_addressbook/kolab_addressbook.php -> roundcubemail-plugins-kolab-3.1.11.tar.gz/plugins/kolab_addressbook/kolab_addressbook.php
Changed
@@ -67,6 +67,7 @@ // Load UI elements if ($this->api->output->type == 'html') { + $this->load_config(); require_once($this->home . '/lib/kolab_addressbook_ui.php'); $this->ui = new kolab_addressbook_ui($this); }
View file
roundcubemail-plugins-kolab-3.1.10.tar.gz/plugins/kolab_auth/kolab_auth.php -> roundcubemail-plugins-kolab-3.1.11.tar.gz/plugins/kolab_auth/kolab_auth.php
Changed
@@ -31,6 +31,7 @@ class kolab_auth extends rcube_plugin { static $ldap; + private $username; private $data = array(); public function init() @@ -54,10 +55,13 @@ // Hook to modify some configuration, e.g. ldap $this->add_hook('config_get', array($this, 'config_get')); + // Hook to modify logging directory $this->add_hook('write_log', array($this, 'write_log')); + $this->username = $_SESSION['username']; - // TODO: This section does not actually seem to work - if ($rcmail->config->get('kolab_auth_auditlog', false)) { + // Enable debug logs per-user, this enables logging only after + // user has logged in + if (!empty($_SESSION['username']) && $rcmail->config->get('kolab_auth_auditlog')) { $rcmail->config->set('debug_level', 1); $rcmail->config->set('devel_mode', true); $rcmail->config->set('smtp_log', true); @@ -160,8 +164,9 @@ if (!empty($role_settings)) { foreach ($role_settings as $role_dn => $settings) { + $role_dn = self::parse_ldap_vars($role_dn); if (!empty($role_settings[$role_dn])) { - $role_settings[$role_dn] = array_merge((array)$role_settings[$role_dn], $settings); + $role_settings[$role_dn] = array_merge((array)$role_settings[$role_dn], $settings); } else { $role_settings[$role_dn] = $settings; } @@ -231,42 +236,26 @@ return $args; } - $args['abort'] = true; - - if ($rcmail->config->get('log_driver') == 'syslog') { - $prio = $args['name'] == 'errors' ? LOG_ERR : LOG_INFO; - syslog($prio, $args['line']); - return $args; - } - else { - $line = sprintf("[%s]: %s\n", $args['date'], $args['line']); + // log_driver == 'file' is assumed here + $log_dir = $rcmail->config->get('log_dir', RCUBE_INSTALL_PATH . 'logs'); - // log_driver == 'file' is assumed here - $log_dir = $rcmail->config->get('log_dir', INSTALL_PATH . 'logs'); - $log_path = $log_dir.'/'.strtolower($_SESSION['kolab_auth_admin']).'/'.strtolower($_SESSION['username']); + // Append original username + target username for audit-logging + if ($rcmail->config->get('kolab_auth_auditlog') && !empty($_SESSION['kolab_auth_admin'])) { + $args['dir'] = $log_dir . '/' . strtolower($_SESSION['kolab_auth_admin']) . '/' . strtolower($this->username); - // Append original username + target username - if (!is_dir($log_path)) { - // Attempt to create the directory - if (@mkdir($log_path, 0750, true)) { - $log_dir = $log_path; - } - } - else { - $log_dir = $log_path; + // Attempt to create the directory + if (!is_dir($args['dir'])) { + @mkdir($args['dir'], 0750, true); } - - // try to open specific log file for writing - $logfile = $log_dir.'/'.$args['name']; - - if ($fp = fopen($logfile, 'a')) { - fwrite($fp, $line); - fflush($fp); - fclose($fp); - return $args; + } + // Define the user log directory if a username is provided + else if ($rcmail->config->get('per_user_logging') && !empty($this->username)) { + $user_log_dir = $log_dir . '/' . strtolower($this->username); + if (is_writable($user_log_dir)) { + $args['dir'] = $user_log_dir; } - else { - trigger_error("Error writing to log file $logfile; Please check permissions", E_USER_WARNING); + else if ($args['name'] != 'errors') { + $args['abort'] = true; // don't log if unauthenticed } } @@ -352,6 +341,9 @@ return $args; } + // temporarily set the current username to the one submitted + $this->username = $user; + $ldap = self::ldap(); if (!$ldap || !$ldap->ready) { $args['abort'] = true; @@ -401,12 +393,12 @@ $_SESSION['user_roledns'] = (array)($record[$role_attr]); } - if (!empty($imap_attr) && !empty($record[$role_attr])) { + if (!empty($imap_attr) && !empty($record[$imap_attr])) { $default_host = $rcmail->config->get('default_host'); if (!empty($default_host)) { rcube::write_log("errors", "Both default host and kolab_auth_mailhost set. Incompatible."); } else { - $args['host'] = "tls://" . $record[$role_attr]; + $args['host'] = "tls://" . $record[$imap_attr]; } } @@ -482,7 +474,7 @@ return $args; } - $args['user'] = $loginas; + $args['user'] = $this->username = $loginas; // Mark session to use SASL proxy for IMAP authentication $_SESSION['kolab_auth_admin'] = strtolower($origname); @@ -505,7 +497,7 @@ $this->data['user_login'] = is_array($record[$login_attr]) ? $record[$login_attr][0] : $record[$login_attr]; } if ($this->data['user_login']) { - $args['user'] = $this->data['user_login']; + $args['user'] = $this->username = $this->data['user_login']; } // User name for identity (first log in)
View file
roundcubemail-plugins-kolab-3.1.10.tar.gz/plugins/kolab_auth/kolab_auth_ldap.php -> roundcubemail-plugins-kolab-3.1.11.tar.gz/plugins/kolab_auth/kolab_auth_ldap.php
Changed
@@ -329,9 +329,12 @@ // fields mapping foreach ($this->fieldmap as $field => $attr) { - if (isset($entry[$attr])) { - $entry[$field] = $entry[$attr]; + // $entry is indexed by lower-case attribute names + $attr_lc = strtolower($attr); + if (isset($entry[$attr_lc])) { + $entry[$field] = $entry[$attr_lc]; } + // @TODO: consider returning also $entry[$attr] when $attr != $attr_lc } return $entry;
View file
roundcubemail-plugins-kolab-3.1.10.tar.gz/plugins/kolab_files/kolab_files.php -> roundcubemail-plugins-kolab-3.1.11.tar.gz/plugins/kolab_files/kolab_files.php
Changed
@@ -52,7 +52,8 @@ // we use libkolab::http_request() from libkolab with its configuration $this->require_plugin('libkolab'); - $this->ui(); + // Load UI from startup hook + $this->add_hook('startup', array($this, 'startup')); } /** @@ -61,6 +62,11 @@ private function engine() { if ($this->engine === null) { + // the files module can be enabled/disabled by the kolab_auth plugin + if ($this->rc->config->get('kolab_files_disabled') || !$this->rc->config->get('kolab_files_enabled', true)) { + return $this->engine = false; + } + $this->load_config(); $url = $this->rc->config->get('kolab_files_url'); @@ -78,6 +84,16 @@ } /** + * Startup hook handler, initializes/enables Files UI + */ + public function startup($args) + { + // call this from startup to give a chance to set + // kolab_files_enabled/disabled in kolab_auth plugin + $this->ui(); + } + + /** * Adds elements of files API user interface */ private function ui()
View file
roundcubemail-plugins-kolab-3.1.10.tar.gz/plugins/libcalendaring/lib/Sabre/VObject/Property.php -> roundcubemail-plugins-kolab-3.1.11.tar.gz/plugins/libcalendaring/lib/Sabre/VObject/Property.php
Changed
@@ -193,6 +193,15 @@ '\\\\', '\n', ); + + // avoid double-escaping of \, and \; from Compound properties + if (method_exists($this, 'setParts')) { + $src[] = '\\\\,'; + $out[] = '\\,'; + $src[] = '\\\\;'; + $out[] = '\\;'; + } + $str.=':' . str_replace($src, $out, $this->value); $out = '';
View file
roundcubemail-plugins-kolab-3.1.10.tar.gz/plugins/libcalendaring/lib/get_sabre_vobject.sh -> roundcubemail-plugins-kolab-3.1.11.tar.gz/plugins/libcalendaring/lib/get_sabre_vobject.sh
Changed
@@ -8,3 +8,5 @@ mv sabre-vobject-2.1.0/lib/* . rm -rf sabre-vobject-2.1.0 +cd lib/Sabre/VObject && wget --no-check-certificate -O Property.php https://raw2.github.com/thomascube/sabre-vobject/84b64c65f9a94f7ec5a5e327bab3cc1335dd613c/lib/Sabre/VObject/Property.php +
View file
roundcubemail-plugins-kolab-3.1.10.tar.gz/plugins/libcalendaring/libvcalendar.php -> roundcubemail-plugins-kolab-3.1.11.tar.gz/plugins/libcalendaring/libvcalendar.php
Changed
@@ -465,7 +465,7 @@ case 'X-MICROSOFT-CDO-BUSYSTATUS': if ($prop->value == 'OOF') - $event['free_busy'] == 'outofoffice'; + $event['free_busy'] = 'outofoffice'; else if (in_array($prop->value, array('FREE', 'BUSY', 'TENTATIVE'))) $event['free_busy'] = strtolower($prop->value); break; @@ -852,9 +852,15 @@ $ve->add($cat); } - if (!empty($event['free_busy'])) + if (!empty($event['free_busy'])) { $ve->add('TRANSP', $event['free_busy'] == 'free' ? 'TRANSPARENT' : 'OPAQUE'); + // for Outlook clients we provide the X-MICROSOFT-CDO-BUSYSTATUS property + if (stripos($this->agent, 'outlook') !== false) { + $ve->add('X-MICROSOFT-CDO-BUSYSTATUS', $event['free_busy'] == 'outofoffice' ? 'OOF' : strtoupper($event['free_busy'])); + } + } + if ($event['priority']) $ve->add('PRIORITY', $event['priority']);
View file
roundcubemail-plugins-kolab-3.1.10.tar.gz/plugins/libkolab/lib/kolab_date_recurrence.php -> roundcubemail-plugins-kolab-3.1.11.tar.gz/plugins/libkolab/lib/kolab_date_recurrence.php
Changed
@@ -118,7 +118,7 @@ } // determine a reasonable end date if none given - if (!$event['recurrence']['COUNT']) { + if (!$event['recurrence']['COUNT'] && $event['start'] instanceof DateTime) { switch ($event['recurrence']['FREQ']) { case 'YEARLY': $intvl = 'P100Y'; break; case 'MONTHLY': $intvl = 'P20Y'; break;
View file
roundcubemail-plugins-kolab-3.1.10.tar.gz/plugins/libkolab/lib/kolab_format_contact.php -> roundcubemail-plugins-kolab-3.1.11.tar.gz/plugins/libkolab/lib/kolab_format_contact.php
Changed
@@ -107,8 +107,8 @@ if (isset($object['nickname'])) $this->obj->setNickNames(self::array2vector($object['nickname'])); - if (isset($object['profession'])) - $this->obj->setTitles(self::array2vector($object['profession'])); + if (isset($object['jobtitle'])) + $this->obj->setTitles(self::array2vector($object['jobtitle'])); // organisation related properties (affiliation) $org = new Affiliation; @@ -117,17 +117,17 @@ $org->setOrganisation($object['organization']); if ($object['department']) $org->setOrganisationalUnits(self::array2vector($object['department'])); - if ($object['jobtitle']) - $org->setRoles(self::array2vector($object['jobtitle'])); + if ($object['profession']) + $org->setRoles(self::array2vector($object['profession'])); $rels = new vectorrelated; - if ($object['manager']) { - foreach ((array)$object['manager'] as $manager) - $rels->push(new Related(Related::Text, $manager, Related::Manager)); - } - if ($object['assistant']) { - foreach ((array)$object['assistant'] as $assistant) - $rels->push(new Related(Related::Text, $assistant, Related::Assistant)); + foreach (array('manager','assistant') as $field) { + if (!empty($object[$field])) { + $reltype = $this->relatedmap[$field]; + foreach ((array)$object[$field] as $value) { + $rels->push(new Related(Related::Text, $value, $reltype)); + } + } } $org->setRelateds($rels); @@ -219,12 +219,13 @@ // spouse and children are relateds $rels = new vectorrelated; - if ($object['spouse']) { - $rels->push(new Related(Related::Text, $object['spouse'], Related::Spouse)); - } - if ($object['children']) { - foreach ((array)$object['children'] as $child) - $rels->push(new Related(Related::Text, $child, Related::Child)); + foreach (array('spouse','children') as $field) { + if (!empty($object[$field])) { + $reltype = $this->relatedmap[$field]; + foreach ((array)$object[$field] as $value) { + $rels->push(new Related(Related::Text, $value, $reltype)); + } + } } $this->obj->setRelateds($rels); @@ -296,7 +297,7 @@ $object['prefix'] = join(' ', self::vector2array($nc->prefixes())); $object['suffix'] = join(' ', self::vector2array($nc->suffixes())); $object['nickname'] = join(' ', self::vector2array($this->obj->nickNames())); - $object['profession'] = join(' ', self::vector2array($this->obj->titles())); + $object['jobtitle'] = join(' ', self::vector2array($this->obj->titles())); $object['categories'] = self::vector2array($this->obj->categories()); // organisation related properties (affiliation) @@ -304,7 +305,7 @@ if ($orgs->size()) { $org = $orgs->get(0); $object['organization'] = $org->organisation(); - $object['jobtitle'] = join(' ', self::vector2array($org->roles())); + $object['profession'] = join(' ', self::vector2array($org->roles())); $object['department'] = join(' ', self::vector2array($org->organisationalUnits())); $this->read_relateds($org->relateds(), $object); } @@ -347,10 +348,10 @@ $object['freebusyurl'] = $this->obj->freeBusyUrl(); if ($bday = self::php_datetime($this->obj->bDay())) - $object['birthday'] = $bday->format('c'); + $object['birthday'] = $bday; if ($anniversary = self::php_datetime($this->obj->anniversary())) - $object['anniversary'] = $anniversary->format('c'); + $object['anniversary'] = $anniversary; $gendermap = array_flip($this->gendermap); if (($g = $this->obj->gender()) && $gendermap[$g])
View file
roundcubemail-plugins-kolab-3.1.10.tar.gz/plugins/tasklist/tasklist.php -> roundcubemail-plugins-kolab-3.1.11.tar.gz/plugins/tasklist/tasklist.php
Changed
@@ -381,27 +381,11 @@ } if (!empty($rec['date'])) { - try { - $date = new DateTime($rec['date'] . ' ' . $rec['time'], $this->timezone); - $rec['date'] = $date->format('Y-m-d'); - if (!empty($rec['time'])) - $rec['time'] = $date->format('H:i'); - } - catch (Exception $e) { - $rec['date'] = $rec['time'] = null; - } + $this->normalize_dates($rec, 'date', 'time'); } if (!empty($rec['startdate'])) { - try { - $date = new DateTime($rec['startdate'] . ' ' . $rec['starttime'], $this->timezone); - $rec['startdate'] = $date->format('Y-m-d'); - if (!empty($rec['starttime'])) - $rec['starttime'] = $date->format('H:i'); - } - catch (Exception $e) { - $rec['startdate'] = $rec['starttime'] = null; - } + $this->normalize_dates($rec, 'startdate', 'starttime'); } // convert tags to array, filter out empty entries @@ -434,6 +418,33 @@ return $rec; } + /** + * Utility method to convert a tasks date/time values into a normalized format + */ + private function normalize_dates(&$rec, $date_key, $time_key) + { + try { + // parse date from user format (#2801) + $date_format = $this->rc->config->get(empty($rec[$time_key]) ? 'date_format' : 'date_long', 'Y-m-d'); + $date = DateTime::createFromFormat($date_format, trim($rec[$date_key] . ' ' . $rec[$time_key]), $this->timezone); + + // fall back to default strtotime logic + if (empty($date)) { + $date = new DateTime($rec[$date_key] . ' ' . $rec[$time_key], $this->timezone); + } + + $rec[$date_key] = $date->format('Y-m-d'); + if (!empty($rec[$time_key])) + $rec[$time_key] = $date->format('H:i'); + + return true; + } + catch (Exception $e) { + $rec[$date_key] = $rec[$time_key] = null; + } + + return false; + } /** * Releases some resources after successful save
View file
roundcubemail-plugins-kolab.dsc
Changed
@@ -2,7 +2,7 @@ Source: roundcubemail-plugins-kolab Binary: roundcubemail-plugins-kolab Architecture: all -Version: 1:3.1.10-0~kolab1 +Version: 1:3.1.11-0~kolab1 Maintainer: Christoph Wickert <wickert@kolabsys.com> Uploaders: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>, Paul Klos <kolab@klos2day.nl> Standards-Version: 3.9.3 @@ -10,5 +10,5 @@ Package-List: roundcubemail-plugins-kolab deb web extra Files: - 00000000000000000000000000000000 0 roundcubemail-plugins-kolab-3.1.10.tar.gz + 00000000000000000000000000000000 0 roundcubemail-plugins-kolab-3.1.11.tar.gz 00000000000000000000000000000000 0 debian.tar.gz
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.