Commit Graph

1129 Commits (459b183a42314d99d4a9a20bd17fa46e6ed2fe4c)

Author SHA1 Message Date
Jesús García Sáez 637ac1e98a oc-rtf: no color table definition
Be able to parse rtf files without color table defined
\colortbl
2015-03-18 18:06:49 +01:00
Enrique J. Hernández Blasco fb4c3a4730 oc-calendar: Fix weekly recurring events exported to Outlook from SOGo
SOGo does not create BYDAY mask in weekly recurrence, so
we have to guess it from the start date's day of week.

In other case, the event is not exported to Outlook and it
says that is corrupted.
2015-03-18 15:08:24 +01:00
Enrique J. Hernández Blasco 6f44ec42c1 oc-calendar: Fix import in SOGo exceptions from recurring series
According to [MS-OXICAL] Section 2.1.3.1.1.20.13, the EXDATE property
must be written only if there are ocurrences from the series that have
been deleted and before this commit ModifiedInstanceDates were also
included.

We check against every ExceptionInfo from exception ocurrences of the series
to know if the ocurrence was deleted or only modified.
2015-03-18 15:08:24 +01:00
Julio García 3b0b43f28f Merge branch 'ejhernandez/peek-preload-bodies-for-real' 2015-03-18 09:28:57 +01:00
Julio García afa9061f2f Merge branch 'ejhernandez/client-drafts-no-updated' 2015-03-18 09:22:41 +01:00
Enrique J. Hernández Blasco 9f3f2aebe4 oc-mail: Register source message as soft deleted on movement
This makes sent mails are not longer automatically copied
to Drafts folder.

Reasoning:

When Outlook sends a mail, OpenChange submits the message and
copy the message to Drafts folder. Afterwards, the client asks
to move this message using SyncImportMessageMove ROP from
Drafts to Sent. During this movement, the message is unregistered
from the indexing database. If the client has updated Drafts
folder before that movement, then the client will keep this
message as the MID is not returned in oxcfxics download sync
as deleted. Setting the message as soft deleted, make it work.
2015-03-18 00:42:01 +01:00
Enrique J. Hernández Blasco 1c1a75d2c1 oc-mail: Use body.peek to preload message bodies
In this way, we do not modify the flags (\Seen) on preloading.
The IMAP server returns the content without .peek section so
it is removed.

This also performs the modification intended by the following
Pull Request:

https://github.com/Zentyal/sogo/pull/50

That tried to avoid set \Seen flag when preloading message bodies
on synchronisation. But in this case we are not incrementing the
modseq as we are not modifying any messages flags.
2015-03-13 10:54:57 +01:00
Enrique J. Hernández Blasco f048860729 Revert "oc-mailfolder: Avoid setting seen flag on preloading message bodies"
This reverts commit 7e0cddc06b.
2015-03-13 00:00:40 +01:00
Enrique J. Hernández Blasco 6d6053865f Revert "oc-mailfolder: Get seen flag directly from message in preloading"
This reverts commit d076e04ad4.
2015-03-13 00:00:29 +01:00
Jesús García Sáez 6e00274988 oc-rtf: safe parse ignoring content
Be able to parse safely \*\xxxxx control words with \binXXXX
elements inside it (before final })
2015-03-12 17:13:17 +01:00
Jesús García Sáez 307fe90854 Merge pull request #99 from Zentyal/ejhernandez/corner-cases-import-PST
oc-mail: Set sender on email messages without an orig recipient
2015-03-11 13:08:33 +01:00
Jesús García Sáez 8031f066dc Merge pull request #98 from Zentyal/ejhernandez/calendar-sharing-invitation
Give support to calendar sharing invitation
2015-03-11 13:07:36 +01:00
Enrique J. Hernández Blasco 2b54897d29 oc-sharing: Guess PidLidSharingFlavor from other props
When it is not set by the client on the first place.

See [MS-OXSHARE] Section 2.2.2.5 for details on returned values.
2015-03-05 00:05:02 +01:00
Enrique J. Hernández Blasco ae7ac1be29 oc-mail: Return sharing properties on sharing object mail message
When it is asked for available properties for an specific message.
2015-03-05 00:02:19 +01:00
Enrique J. Hernández Blasco 6af8b486df oc-mail: Return special properties on sharing_metadata.xml attachment
As required by [MS-OXWSMSHR] Section 3.1.1 to display the share
object message correctly and be able to open the shared calendar
directly from the message.
2015-03-04 18:49:31 +01:00
Enrique J. Hernández Blasco 316ade13f8 oc: Implement Sharing Message Object
It acts as a proxy of MAPIStoreMailMessage and it manages the properties
defined in [MS-OXSHARE] Section 2.2 by storing them in the mail message
as eXtensible MIME headers which starts with X-MS-Sharing.
2015-03-04 18:49:17 +01:00
Carlos Pérez-Aradros Herce 3b2cbb945c oc: Free headerEncoding variable 2015-03-04 10:10:32 +01:00
Enrique J. Hernández Blasco 44dfd35521 oc-mail: Set sender on email messages without an orig recipient
But it has recipients. This is for sure happening with event
invitations messages.
2015-03-03 22:52:42 +01:00
Enrique J. Hernández Blasco 575600cabc oc-calendar: Return PidTagContainerClass for Calendar folders
And it must "IPF.Appointment" as described in [MS-OXOCAL] Section 2.2.11.1
2015-03-03 17:47:37 +01:00
Julio J. García Martín 9b038db0b6 Merge pull request #93 from Zentyal/jvalles/missing-contact-props
Save missing contact properties in database
2015-03-02 09:17:15 +01:00
Julio J. García Martín bcc1aa8049 Merge pull request #89 from Zentyal/jag/set-null-recurrence-pattern
In setupRecurrenceWithMasterEntit a null recurrence pattern is now inter...
2015-03-02 09:16:38 +01:00
Javier Amor García ef6aab63c9 oc-calendar: Don't change event recurrence if parse failed.
get_AppointmentRecurrencePattern() can fail to parse the input data, added a check to avoid setup the recurrence pattern in that case. This should only happen when input data is incorrect.
2015-02-27 17:32:22 +01:00
Juan Vallés 4c3c741d9f oc-contacts: Save missing contact properties in database 2015-02-25 11:59:24 +01:00
Jesús García Sáez 731934f061 oc: Add fai properties for custom views
Without this outlook clients with custom views set on folders will
crash because this are needed properties and were not being saved
2015-02-24 17:44:56 +01:00
Enrique J. Hernández Blasco 9b847a276c oc-calendar: Implement categories to share the colour
See [MS-OXCICAL] Section 2.1.3.1.1.20.3 for details.

It requires https://github.com/openchange/openchange/pull/216 to retrieve
the value from MAPI client
2015-02-17 10:20:16 +01:00
Jesús García Sáez 68216a7456 Merge pull request #87 from Zentyal/ejhernandez/fixes-on-calendar-props
Calendar: PidTagSensitivity and PidTagImportance now works in Outlook
2015-02-16 11:00:45 +01:00
Enrique J. Hernández Blasco 624967c60b oc-calendar: Implement PidTagSensitivity
As described in [MS-OXCICAL] Section 2.1.3.11.20.4 by using
access CLASS iCal field.

Although Outlook does not support confidential level, it is properly
exported and imported.
2015-02-15 18:44:47 +01:00
Enrique J. Hernández Blasco e6ba15bbae oc-calendar: PidTagImportance and PidTagNormalizedSubject working
It wasn't being called because the proxy (AppointmentWrapper) is not
being called as there is a base implementation for these properties
in MAPIStoreMessage making them impossible to be shared between
Outlook profiles.
2015-02-15 18:41:03 +01:00
Enrique J. Hernández Blasco 2a1b363fee oc-calendar: Proper getter for AppointmentWrapper proxy object
Do not assume it is in 0 position any longer
2015-02-15 18:39:43 +01:00
Enrique J. Hernández Blasco eaec3c0610 oc-calendar: Remove useless method
Better off implemented by AppointmentWrapper proxy
2015-02-15 18:38:59 +01:00
Enrique J. Hernández Blasco d3a4b497c6 oc-calendar: Remove commented code
Available at MAPIStoreAppointmentWrapper class
2015-02-15 18:34:28 +01:00
Jesús García Sáez 7406fc3772 Merge pull request #83 from Zentyal/ejhernandez/move-subfolder-to-root
Move subfolder (Mail, Journal, Notes) to root
2015-02-11 15:29:26 +01:00
Enrique J. Hernández Blasco 68ebc9e0ff oc: Use dlinklist from samba for now
Due to https://github.com/openchange/openchange/pull/204.

Until it is published by OC or dismissed.
2015-02-10 23:37:40 +01:00
Enrique J. Hernández Blasco 96986812f4 oc-mail: Set content type for a message after upgrading sope 2.2.15
Now that message headers can be set dynamically, we can
set the body-related headers using `setHeader` selector.

This fixes emails sent using this sope version are all in plain text.
2015-02-07 00:22:45 +01:00
Enrique J. Hernández Blasco 142deeb5f0 oc: Implement move a DB subfolder to root
DB folders are Notes and Fallback (Journal, InfoPath Form and Deleted Items).

By moving the DB path and update the indexing DB.
2015-02-05 23:49:59 +01:00
Enrique J. Hernández Blasco dc8012e3d3 oc-mail: Implement move a mail subfolder to root
By moving at IMAP level the mailbox and update the indexing DB
and local db path.
2015-02-05 23:48:46 +01:00
Julio García 12b159a6c0 Merge branch 'master-upstream' into jjgarcia/merge-from-upstream 2015-02-02 12:53:49 +01:00
Jesús García Sáez 6cfa6b9952 Merge pull request #82 from Zentyal/jgarcia/appointments-alarms
oc-appointments: ignore alarms already triggered
2015-01-28 18:57:36 +01:00
Jesús García Sáez 0a198ccb05 Merge pull request #81 from Zentyal/ejhernandez/fix-move-db-folder
oc: Set right container in dbFolder when moving a folder
2015-01-28 16:34:27 +01:00
Jesús García Sáez 5258ee2e76 oc-appointments: ignore alarms already triggered 2015-01-28 12:56:27 +01:00
Enrique J. Hernández Blasco 57d591c427 oc: Set right container in dbFolder when moving a folder
The path attribute from SOGoCacheGCSFolder is properly updated
in the database but not when returning from path message as
the container is the old one.
2015-01-28 11:26:56 +01:00
Enrique J. Hernández Blasco b01de763da oc: Move back and forth folders now are in sync
Two different indexing entries were created on move operation making
impossible to restore old folder position in the original parent folder.
This was due to cleanupCaches message calls to objectId which requires
to have the indexing entry available.

Use case:

  * Restore a folder from "Deleted items" folders
2015-01-27 18:27:11 +01:00
Enrique J. Hernández 2dcb8fa732 Merge pull request #75 from Zentyal/ejhernandez/move-mail-folder-with-reserved-chars
oc-mail: Move mail folders with reserved chars
2015-01-26 23:39:15 +01:00
Enrique J. Hernández Blasco 0e8bf0d239 oc-mail: Move mail folders with reserved chars
The URL was incorrectly set when any of ;/?:@&=+$,# was used
in the folder name.

We have to mimetise what it is done in createFolder message selector.
That is, perform the IMAP4 encoding + URL encoding without CSS
encoding. The IMAP4 + CSS encoding (without URL encoding) is used to store the folder
in SOGo and OpenChange Indexing database as we do right now.
2015-01-26 15:55:22 +01:00
Jesús García Sáez 312084243b oc: improve modseqFromMessageChangeNumber to return an approximation.
Only for scenarios where we hadn't store the cn <-> modseq relationship
2015-01-23 18:19:24 +01:00
Jesús García Sáez 47be392d4f oc: avoid request change number until necessary
Minor changenumber leak, but avoid it anyway
2015-01-23 18:18:25 +01:00
Jesús García Sáez 34efcfee4e oc: synchroniseCache store modseq for last delete change number.
This will be the more frequent change number used to obtain updates
on the folder related with deleted messages
2015-01-23 18:17:45 +01:00
Jesús García Sáez 8e7f6d1aec oc: avoid change number leaking when refreshing folder.
Everytime a folder where its last operation was delete some email was
requesting change numbers that were not used.
2015-01-23 18:15:44 +01:00
Enrique J. Hernández Blasco 99a36be034 oc: Remove a source folder on move folder operation
Calling deleteFolder message to actually remove it from DB/IMAP
depending on the class.
2015-01-21 12:44:31 +01:00
Jesús García Sáez 8e41e5d665 Merge pull request #71 from Zentyal/ejhernandez/filetime-utc
Use PT_SYSTIME as absolute timestamp
2015-01-20 16:54:56 +01:00
Jesús García Sáez b1dfe47f01 Merge pull request #70 from Zentyal/jgarcia/working-encoding-parse
Outlook can view mails with non-ascii characters in their body (II)
2015-01-20 14:36:50 +01:00
Jesús García Sáez 014632fddb Merge pull request #72 from Zentyal/ejhernandez/wedding-anniversary
oc-contacts: Implement Wedding Anniversary
2015-01-20 14:36:14 +01:00
Enrique J. Hernández Blasco 8b44c08a32 oc-calendar: Remove unnecessary shifts on start,end and replace time props
As the data is sent in UTC, no shifts are longer required.
2015-01-20 14:35:32 +01:00
Enrique J. Hernández Blasco c893963da5 oc-tasks: Set right start, due and complete dates
As explained in [MS-OXOTASK], we have to shift the given date
to store the right point in time with the correct timezone.
2015-01-20 14:35:32 +01:00
Enrique J. Hernández Blasco c6b976a830 oc-mail: Remove unnecessary time shift in date for new mails
The MIME type can store the date in UTC and the clients are
responsible on showing correctly to the client as it does.
2015-01-20 14:35:32 +01:00
Enrique J. Hernández Blasco d5d97db8e8 oc: PT_SYSTIME is an absolute timestamp
As the epoch is in UTC timezone, we set this timezone for NSCalendarDate.
2015-01-20 14:35:32 +01:00
Carlos Pérez-Aradros Herce 00cef845b7 Restore multitenancy changes for OpenChange 2015-01-19 19:04:06 +01:00
Jesús García Sáez f9550b9181 oc: several uninitialized variables 2015-01-19 15:35:44 +01:00
Enrique J. Hernández Blasco b35fee8efc oc-contacts: Implement Wedding Anniversary
As specified by Microsoft using x-ms-anniversary custom vcard element
[MS-OXVCARD] Section 2.1.3.9.6
2015-01-16 01:34:16 +01:00
Jesús García Sáez 7e7d302165 oc: warning if codepage not found from headerCharset 2015-01-15 13:50:26 +01:00
Jesús García Sáez d052356724 oc: encoding names must be case insensitive 2015-01-15 13:27:37 +01:00
Jesús García Sáez 838ae8995f oc: ignore unhandled properties instead of abort
When setting a row with properties not handled right now, ignore them
like they were never there instead of abort()
2014-12-29 19:20:27 +01:00
Jesús García Sáez 3ef28b390d Merge pull request #66 from Zentyal/ejhernandez/guessing-recipients-from-import-PST
oc: Guess recipients from some properties while importing PST
2014-12-24 13:16:46 +01:00
Jesús García Sáez 501ee79766 oc-rtf: fix parse \pict tag with \bin data 2014-12-23 11:14:54 +01:00
Enrique J. Hernández Blasco a56fc93a9a oc: Guess recipients from some properties while importing PST
This is happening when importing a PST file.

From -> PidTagSenderEntryId
To   -> PidTagOriginalDisplayTo
CC   -> PidTagOriginalDisplayCc

The tested EntryID are the local users and OneOffEntries
when the users are not from the directory.

It requires https://github.com/openchange/openchange/pull/175 to work.
2014-12-23 00:59:29 +01:00
Enrique J. Hernández Blasco dba17fbcbc Create child folder objects using parent context for real
We activate the user for the context using the root folder
context as there are times where the active user is not
matching with the one stored in the application context
and SOGo object is storing cached data with the wrong user
leading to create folders in wrong mailboxes, etc.

As this application is single-threaded, no problems are expected.
Indeed, the same code is available at getting the root folder (ie INBOX).
2014-12-16 23:43:57 +01:00
Jesús García Sáez ba79234ceb Merge pull request #64 from Zentyal/ejhernandez/store-change-number-subfolders-cache
Store changeNumber maps with modseq in cache for subfolders
2014-12-03 16:05:51 +01:00
Enrique J. Hernández Blasco 067809ef1c Store changeNumber maps with modseq in cache for subfolders
By getting the root folder/container whose properties
are stored in OpenChange DB.

This makes the synchronisation of sub-folders faster as
when we evaluate restrictions for this folder, we are able
to get the modseq from where to get the latest messages
unseen by the client.
2014-12-01 23:19:38 +01:00
Jesús García Sáez bdf12e5c01 Merge pull request #62 from Zentyal/ejhernandez/fix-space-temporal-crash-setChangeKey
Attempt to sync an UID in setChangeKey to avoid crashing
2014-12-01 19:45:51 +01:00
Jesús García Sáez 97201c56a4 abort if attemp to sync an UID in setChangekey fails 2014-12-01 10:47:16 +01:00
Enrique J. Hernández Blasco 7691d616a9 Attempt to sync an UID in setChangeKey to avoid crashing
This may happen if between sync cache and setChangeKey a modSeq
is making synchroniseCache not retrieve the newly stored message.

This should fix the following crash:

https://tracker.zentyal.org/issues/2673
2014-11-29 08:07:41 +01:00
Enrique J. Hernández Blasco f4e15e2db8 Fix memory leak on getPidTagSubject
Valgrind crafted report:

=40967== 128,927 (53,750 direct, 75,177 indirect) bytes in 383 blocks are definitely lost in loss record 10,104 of 10,179
==40967==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==40967==    by 0x86EDE3D: talloc_strndup (talloc.c:613)
==40967==    by 0x34D2BB9E: _i_NSString_MAPIStoreDataTypes_asUnicodeInMemCtx_ (in /usr/lib/GNUstep/SOGo/SOGoBackend.MAPIStore/SOGoBackend)
==40967==    by 0x34D2025B: _i_MAPIStoreMailMessage__getPidTagNormalizedSubject_inMemCtx_ (in /usr/lib/GNUstep/SOGo/SOGoBackend.MAPIStore/SOGoBackend)
==40967==    by 0x34CFCD40: _i_MAPIStoreObject__getProperty_withTag_inMemCtx_ (in /usr/lib/GNUstep/SOGo/SOGoBackend.MAPIStore/SOGoBackend)
==40967==    by 0x34CFBE21: _i_MAPIStoreMessage__getPidTagSubject_inMemCtx_ (in /usr/lib/GNUstep/SOGo/SOGoBackend.MAPIStore/SOGoBackend)
==40967==    by 0x34CFBEB6: _i_MAPIStoreMessage__getPidTagOriginalSubject_inMemCtx_ (in /usr/lib/GNUstep/SOGo/SOGoBackend.MAPIStore/SOGoBackend)
==40967==    by 0x34CFCD40: _i_MAPIStoreObject__getProperty_withTag_inMemCtx_ (in /usr/lib/GNUstep/SOGo/SOGoBackend.MAPIStore/SOGoBackend)
==40967==    by 0x34CFD07E: _i_MAPIStoreObject__getProperties_withTags_andCount_inMemCtx_ (in /usr/lib/GNUstep/SOGo/SOGoBackend.MAPIStore/SOGoBackend)
2014-11-28 10:04:10 +01:00
Enrique J. Hernández Blasco a8b716fbaa oc: sync old messages as last resort if there are not in cache
This is happening when the lastModSeq is greater than the modseq
from an old message and that message is not in cache.

This is used as last resort before crashing and it is only used
in objectVersion as it is the first place to call on sync. Other
related properties would work.
2014-11-19 17:16:45 +01:00
Enrique J. Hernández Blasco ef7b919175 Return MAPISTORE_ERR_NOT_FOUND when a mail is indexed but not in IMAP server
And remove that entry from the indexing table.

This avoids to crash getting properties from a no longer available message
in the IMAP server, for instance, the `PidTagPredecessorChangeList` attribute.
2014-11-19 17:12:32 +01:00
Jesús García Sáez 973ab78761 oc: synchronize folders ChangeNumber <-> modseq 2014-11-19 17:12:32 +01:00
Jesús García Sáez 41320a4813 oc: NGImap4Connection:fetchUids changed error messages 2014-11-19 17:12:32 +01:00
Jesús García Sáez c410a9fc3f oc: NGImap4Connection:fetchUids don't delete RawResponse 2014-11-19 17:12:31 +01:00
Jesús García Sáez 24e35103ff oc: monkeypatched NGImap4Connection class from sope
To improve fetchUids method so we can retrieve uids in batches.
Otherwise we will face an error 'too long request' kind
2014-11-19 17:12:31 +01:00
Enrique J. Hernández Blasco 616f2abbb2 Fix compilation when samba file is not others readable
This happens when any smb.conf or included file is not others readable,
thus we are fallbacking to the default installation path.
2014-11-19 17:12:31 +01:00
Enrique J. Hernández Blasco 3910769ae8 oc-folder: Uniform call to deleteMessageWithMID
To make sure flags argument is used accordingly with the specs
and not working by chance.
2014-11-19 17:12:31 +01:00
Enrique J. Hernández Blasco b67e1deda5 oc-folder: Make deleted items synched when shared
By keeping mid on moving messages by soft deleting and
only if srcMid is different from targetMid.

This makes restore/shared deleted items work.

It also requires to do the following to work smoothly:

* Do not add soft-deleted messages in ensureIDsForChildKeys
* Return soft-deleted messages on getDeletedFMIDs
* Do not register a new mid if the URL is matched with soft deleted messages
2014-11-19 17:12:31 +01:00
Enrique J. Hernández Blasco 35ca313c37 oc-calendar: Fix PidLidClipStart on recurrent events
The midnight value must be in user's timezone and returned back in UTC.
2014-11-19 17:12:31 +01:00
Enrique J. Hernández Blasco c631689975 oc-calendar: getPidLidClipEnd now follows [MS-OXOCAL]
On recurrent events when there is no end, the time to set is
31 August 4500, 11:59 P.M ([MS-OXOCAL] Section 2.2.1.15)
2014-11-19 17:12:30 +01:00
Enrique J. Hernández Blasco cd64ca199a oc-calendar: wDay field cannot be negative
Furthermore, [MS-OXOCAL] Section 2.2.1.41.1 indicates:

   The wDay field is set to indicate
   the occurrence of the day of the week within the month
   (1 to 5, where 5 indicates the final occurrence during
   the month if that day of the week does not occur 5 times).

[rule firstOccurrence] may return negative values according to iCal spec for
recurrent rules iCal 4.8.5.4 Recurrence Rule. For instance, for defining
a timezone whose recurrent rule is done using this rule:

   RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU

This fixes the problem when editing a recurrent appointment in
Outlook were incorrectly shifted when SOGo provides back the event.
2014-11-19 17:12:30 +01:00
Enrique J. Hernández Blasco be60fdebcc oc-folder: Flags are now used in indexing db when deleting a msg
Unregistering the URL in indexing db accordingly to the flags (SOFT or HARD)
2014-11-19 17:12:30 +01:00
Enrique J. Hernández Blasco d076e04ad4 oc-mailfolder: Get seen flag directly from message in preloading
To avoid a loop and a server-call.

We are not using body.peek[text] directly because bodyContentPart message
is explicitly avoiding it.
2014-11-19 17:12:30 +01:00
Enrique J. Hernández Blasco 7e0cddc06b oc-mailfolder: Avoid setting seen flag on preloading message bodies
Fetching a body[text] property using IMAP makes IMAP server set seen flag.

This commit fetches the flag beforehand to restore the previous state
once the body has been fetched.
2014-11-19 17:12:30 +01:00
Enrique J. Hernández Blasco 258444bb93 oc-rtf: Be more resilient to spaces while parsing font tables
This avoids to crash on this example:

  \f0\fibi \fcharset0
   -------^

Or:

  \f0 \fibi\fcharset0
   --^

Take into account that I found lots of RTF documents with this format:

  \f0\fbidi \froman\fcharset0
  \f0\froman\fprq2 \fcharset0

Which are not unsupported by this handler.
2014-11-19 17:12:30 +01:00
Enrique J. Hernández Blasco 75ce59d010 oc-rtf: Fix current position to match where _bytes pointer is
This avoids to have extra unknown bytes at the end of the RTF document
as _len would have been reached but _current_pos had incorrect less value.
2014-11-19 17:12:29 +01:00
Enrique J. Hernández Blasco cbfcd54858 oc-rtf: Use what RTF Spec 1.9.1 for control words
This reverts 7581c0a.
2014-11-19 17:12:29 +01:00
Enrique J. Hernández Blasco 415fb6034e oc-calendar: Retrieve properly event description created on SOGo
As it is stored as plain text without triming string.

The correct comparison here is NSNotFound as stated in Apple documentation.
2014-11-19 17:12:29 +01:00
Jesús García Sáez 445a1fb2d6 oc: MailMessages return correct codepage 2014-11-19 17:12:29 +01:00
Enrique J. Hernández Blasco c866bce8e8 Store FreeBusySimple and FreeBusyDetailed rights as roles
Map: FreeBusySimple -> PublicDAndTViewer
     FreeBusyDetailed -> ConfidentialDAndTViewer

Although SOGo is not really used AFAIK, we can now keep it and
keep Calendar permission issues consistent.
2014-11-19 17:12:29 +01:00
Jesús García Sáez ed4ca3bd1b oc: add talloc reference to indexing context
We have a cache with user contexts (objc) which have mapping contexts (objc)
where we store the indexing context (c) which will be freed by openchange
code once the connection is closed.

Right now all indexing context created for an user are the same,
independently when in time was created or by which connection, etc...
So this is a valid workaround, but this has to be refactored to used the
indexing context of the current connection that is performing the
call to SOGo backend.
2014-11-19 17:12:29 +01:00
Jesús García Sáez bb9764bc6b Revert "oc: cached usercontext updates indexing_context"
This reverts commit 0750f64b787db088e944756b66fbd0883cf44cbf.
2014-11-19 17:12:28 +01:00
Jesús García Sáez 05578bfcb6 oc-rtf: control words can also have a space before next tag
This was causing to parse a single space as an empty control
word with length 0, which was the source of several crashes.

Example:

  \f0\fbidi \fcharset0
   --------^

font index is 0, font family is bidi but when parsing charset we were
assuming control word was '' instead of 'charset0'.

This only fixes the crashes, the parseFontTable function works quite
awful right now.
2014-11-19 17:12:28 +01:00
Jesús García Sáez a7c2054cce oc: cached usercontext updates indexing_context
Instead of use always the one given on initialization
2014-11-19 17:12:28 +01:00
Julien Kerihuel 52ad0e0e5b Prevent SOGo backend from crashing when mapistore_set_connection_info is
not called beforehand and connInfo is not initialized.
2014-11-19 17:12:28 +01:00
Kamen Mazdrashki dc8b73b12b oc/MailFolder: Add more logging so we can trace invalid message kyes 2014-11-19 17:12:28 +01:00
Kamen Mazdrashki 18acdf20a6 oc: Make sure we always use NSString keys in 'messages' dictionary
Different types for keys in Dictionaries leads to not finding
expected entry - we should make sure that everythime we set/get
entry from a dictionary, key object type is same
2014-11-19 17:12:27 +01:00