Projects
Kolab:16:Enterprise
kolab-syncroton
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 22
View file
kolab-syncroton.spec
Changed
@@ -36,7 +36,7 @@ %global _ap_sysconfdir %{_sysconfdir}/%{httpd_name} Name: kolab-syncroton -Version: 2.3.12 +Version: 2.3.13 Release: 1%{?dist} Summary: ActiveSync for Kolab Groupware @@ -195,6 +195,9 @@ %attr(0770,%{httpd_user},%{httpd_group}) %{_var}/log/%{name} %changelog +* Fri Aug 17 2018 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 2.3.13-1 +- Release 2.3.13 + * Wed Jun 13 2018 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 2.3.12-1 - Release 2.3.12
View file
debian.changelog
Changed
@@ -1,3 +1,9 @@ +kolab-syncroton (2.3.13-0~kolab1) unstable; urgency=low + + * Release 2.3.13 + + -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Fri, 17 Aug 2018 15:13:40 +0200 + kolab-syncroton (2.3.12-0~kolab1) unstable; urgency=low * Release 2.3.12
View file
kolab-syncroton-2.3.12.tar.gz/config/config.inc.php.dist -> kolab-syncroton-2.3.13.tar.gz/config/config.inc.php.dist
Changed
@@ -5,9 +5,6 @@ // Enables ActiveSync protocol debuging $config'activesync_debug' = true; -// Enables logging to a separate directory for every user/device -$config'activesync_user_log' = false; - // If specified all ActiveSync-related logs will be saved to this file // Note: This doesn't change Roundcube Framework log locations $config'activesync_log_file' = null;
View file
kolab-syncroton-2.3.12.tar.gz/lib/kolab_sync.php -> kolab-syncroton-2.3.13.tar.gz/lib/kolab_sync.php
Changed
@@ -46,7 +46,7 @@ public $password; const CHARSET = 'UTF-8'; - const VERSION = "2.3.12"; + const VERSION = "2.3.13"; /** @@ -392,52 +392,37 @@ $this->logger->set_username($this->username); - $user_debug = $this->config->get('per_user_logging'); - $user_log = $user_debug || $this->config->get('activesync_user_log'); + $user_debug = (bool) $this->config->get('per_user_logging'); - if (!$user_log) { + if (!$user_debug) { return; } $log_dir = $this->config->get('log_dir'); $log_dir .= DIRECTORY_SEPARATOR . $this->username; - // No automatically creating any log directories. + // No automatically creating any log directories if (!is_dir($log_dir)) { - return; - } - - // No dir, no glory - if (!mkdir($log_dir, 0770)) { + $this->logger->set_log_dir(null); return; } if (!empty($_GET'DeviceId')) { - $log_dir .= DIRECTORY_SEPARATOR . $_GET'DeviceId'; - } + $dev_dir = $log_dir . DIRECTORY_SEPARATOR . $_GET'DeviceId'; - if (!is_dir($log_dir)) { - if (!mkdir($log_dir, 0770)) { - return; + if (is_dir($dev_dir) || mkdir($dev_dir, 0770)) { + $log_dir = $dev_dir; } } - if ($user_debug) { - $this->per_user_log_dir = $log_dir; - } - else { - $this->config->set('log_dir', $log_dir); - } - - // re-set PHP error logging - if (($this->config->get('debug_level') & 1) && $this->config->get('log_driver') != 'syslog') { - ini_set('error_log', $log_dir . '/errors'); - } + $this->per_user_log_dir = $log_dir; + $this->logger->set_log_dir($log_dir); + $this->config->set('log_dir', $log_dir); } /** - * Get the per-user log directory - */ + * Get the per-user log directory + */ public function get_user_log_dir() { return $this->per_user_log_dir;
View file
kolab-syncroton-2.3.12.tar.gz/lib/kolab_sync_data_calendar.php -> kolab-syncroton-2.3.13.tar.gz/lib/kolab_sync_data_calendar.php
Changed
@@ -116,6 +116,9 @@ const SENSITIVITY_PRIVATE = 2; const SENSITIVITY_CONFIDENTIAL = 3; + const KEY_DTSTAMP = 'x-custom.X-ACTIVESYNC-DTSTAMP'; + const KEY_RESPONSE_DTSTAMP = 'x-custom.X-ACTIVESYNC-RESPONSE-DTSTAMP'; + /** * Mapping of attendee status * @@ -474,13 +477,8 @@ // Attendees // Outlook 2013 sends a dummy update just after MeetingResponse has been processed, // this update resets attendee status set in the MeetingResponse request. - // We ignore attendees data in such updates, they should not happen according to - // https://msdn.microsoft.com/en-us/library/office/hh428685(v=exchg.140).aspx - // but they will contain some data as alarms and free/busy status so we don't - // ignore them completely - if ($is_outlook && !empty($entry) && $data->timezone == $dummy_tz - && $data->responseRequested && !empty($data->attendees) - ) { + // We ignore changes to attendees data on such updates + if ($is_outlook && $this->isDummyOutlookUpdate($data, $entry, $event)) { $attendees = $entry'attendees'; } else if (isset($data->attendees)) { @@ -551,7 +549,7 @@ // is needed, e.g. when updating attendee status. // We try our best to bump the SEQUENCE only when expected if (!empty($entry) && !$is_exception && !empty($data->attendees) && $data->timezone != $dummy_tz) { - if ($last_update = $this->getKolabDataItem($event, 'x-custom.X-ACTIVESYNC-DTSTAMP')) { + if ($last_update = $this->getKolabDataItem($event, self::KEY_DTSTAMP)) { $last_update = new DateTime($last_update); } @@ -567,7 +565,7 @@ // the event modification time is not (re)set by the server, // we use the original Outlook's timestamp. if ($is_outlook && $data->dtStamp) { - $this->setKolabDataItem($event, 'x-custom.X-ACTIVESYNC-DTSTAMP', $data->dtStamp->format(DateTime::ATOM)); + $this->setKolabDataItem($event, self::KEY_DTSTAMP, $data->dtStamp->format(DateTime::ATOM)); } // This prevents kolab_format code to bump the sequence when not needed @@ -606,8 +604,18 @@ case 'DECLINED': $event'free_busy' = 'free'; break; } */ + // Store Outlook response timestamp for further use + if (stripos($this->device->devicetype, 'outlook') !== false) { + $dtstamp = new DateTime('now', new DateTimeZone('UTC')); + $dtstamp = $dtstamp->format(DateTime::ATOM); + } + // Update/Save the event if (empty($existing)) { + if ($dtstamp) { + $this->setKolabDataItem($event, self::KEY_RESPONSE_DTSTAMP, $dtstamp); + } + $folder = $this->save_event($event, $status); // Create SyncState for the new event, so it is not synced twice @@ -635,6 +643,10 @@ } } else { + if ($dtstamp) { + $this->setKolabDataItem($existing, self::KEY_RESPONSE_DTSTAMP, $dtstamp); + } + $folder = $this->update_event($event, $existing, $status, $request->instanceId); } @@ -1043,4 +1055,39 @@ return $rec; } + + /** + * Check if the event update request is a fake (for Outlook) + */ + protected function isDummyOutlookUpdate($data, $entry, &$result) + { + $is_dummy = false; + + // Outlook 2013 sends a dummy update just after MeetingResponse has been processed, + // this update resets attendee status set in the MeetingResponse request. + // We ignore attendees data in such updates, they should not happen according to + // https://msdn.microsoft.com/en-us/library/office/hh428685(v=exchg.140).aspx + // but they will contain some data as alarms and free/busy status so we don't + // ignore them completely + if (!empty($entry) && !empty($data->attendees) && stripos($this->device->devicetype, 'outlook') !== false) { + // Some of these requests use just dummy Timezone + $dummy_tz = str_repeat('A', 230) . '=='; + + if ($data->timezone == $dummy_tz) { + $is_dummy = true; + } + + // But some of them do not, so we have check if that is a first + // update immediately (up to 5 seconds) after MeetingResponse request + if (!$is_dummy && ($dtstamp = $this->getKolabDataItem($entry, self::KEY_RESPONSE_DTSTAMP))) { + $dtstamp = new DateTime($dtstamp); + $now = new DateTime('now', new DateTimeZone('UTC')); + $is_dummy = $now->getTimestamp() - $dtstamp->getTimestamp() <= 5; + } + + $this->unsetKolabDataItem($result, self::KEY_RESPONSE_DTSTAMP); + } + + return $is_dummy; + } }
View file
kolab-syncroton-2.3.12.tar.gz/lib/kolab_sync_logger.php -> kolab-syncroton-2.3.13.tar.gz/lib/kolab_sync_logger.php
Changed
@@ -29,12 +29,22 @@ { public $mode; + protected $logfile; + protected $format; + protected $log_dir; + protected $username; + /** * Constructor */ function __construct($mode = null) { - $this->mode = intval($mode); + $rcube = rcube::get_instance(); + + $this->mode = intval($mode); + $this->logfile = $rcube->config->get('activesync_log_file'); + $this->format = $rcube->config->get('log_date_format', 'd-M-Y H:i:s O'); + $this->log_dir = $rcube->config->get('log_dir'); $r = new ReflectionClass($this); $this->_priorities = $r->getConstants(); @@ -56,11 +66,6 @@ */ public function log($message, $method, $extras = null) { - $rcube = rcube::get_instance(); - $logfile = $rcube->config->get('activesync_log_file'); - $format = $rcube->config->get('log_date_format', 'd-M-Y H:i:s O'); - $log_dir = $rcube->get_user_log_dir() ?: $rcube->config->get('log_dir'); - if (is_numeric($method)) { $mode = $method; $method = array_search($method, $this->_priorities); @@ -69,10 +74,20 @@ $mode = $this->_priorities$method; } + // Don't log messages with lower prio than the configured one if ($mode > $this->mode) { return; } + // Don't log debug messages if it's disabled e.g. by per_user_logging + if (empty($this->log_dir) && $mode >= self::NOTICE) { + return; + } + + $rcube = rcube::get_instance(); + $log_dir = $this->log_dir ?: $rcube->config->get('log_dir'); + $logfile = $this->logfile; + // if log_file is configured all logs will go to it // otherwise use separate file for info/debug and warning/error if (!$logfile) { @@ -121,7 +136,7 @@ } } - $date = rcube_utils::date_format($format); + $date = rcube_utils::date_format($this->format); $logline = sprintf("%s: %s %s\n", $date, $method, $message); if ($fp = @fopen($logfile, 'a')) { @@ -144,4 +159,12 @@ { $this->username = $username; } + + /** + * Set log directory + */ + public function set_log_dir($dir) + { + $this->log_dir = $dir; + } }
View file
kolab-syncroton.dsc
Changed
@@ -2,7 +2,7 @@ Source: kolab-syncroton Binary: kolab-syncroton Architecture: all -Version: 2.3.12-0~kolab1 +Version: 2.3.13-0~kolab1 Maintainer: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Uploaders: Paul Klos <kolab@klos2day.nl> Homepage: http://www.kolab.org/ @@ -12,5 +12,5 @@ Package-List: kolab-syncroton deb utils extra Files: - 00000000000000000000000000000000 0 kolab-syncroton-2.3.12.tar.gz + 00000000000000000000000000000000 0 kolab-syncroton-2.3.13.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
.