Commit Graph
376 Commits
Author SHA1 Message Date
Héctor Luaces 0f937186ae fix(calendar): check all changes before sending any
When one save changes several occurrences, each change is sent to the
attendees in turn. If a later change was refused, for example because a
resource was already booked, the earlier changes had already reached the
attendees while the organizer's calendar was left unchanged.

Run the booking and availability checks for all changes first, and send
nothing if one of them fails. A save with a single change skips this step,
because the normal check already covers it.
2026-11-20 09:35:53 +01:00
Héctor Luaces 5c6a8fc8ee fix(calendar): send every organizer change to the attendees
When an organizer saves a recurring event from a CalDAV client and the save
changes several occurrences, SOGo sends only one of those changes to the
attendees. The other changes are stored in the organizer's calendar, but
the attendees never receive them and no error is reported. Which change is
sent depends on the order of the occurrences in the request.

Send every change instead: first the removed occurrences, then the added or
changed occurrences, and last the main event if it changed. The main event
goes last because attendees then receive the whole series, which must
already include the updated occurrences.

The checks on the organizer and on delegated senders are unchanged.

Reported to Alinto support as ticket 6099.
2026-11-20 09:35:53 +01:00
Hadrien Blanc 82e49b5eab fix(mail): replace the previous signature when switching identity
setFromIdentity located the previous signature by embedding its HTML
in a regular expression. Metacharacters, plain text and CKEditor's
<br> serialization made the search miss, and the regex-too-large
fallback appended the new signature.

The delimiter is now matched with a fixed-size pattern. The signature
body is compared as text, from the end of the break that follows the
dash. A missed match is null. One missing blank line before the
delimiter is still recognized.

Fixes #6168
Fixes #6214
Fixes #5695
2026-11-13 16:54:27 +01:00
Hivert Quentin 17403a5a81 fix(tests): fix spec test v2 2026-11-11 20:32:58 +01:00
Hivert Quentin 0a57b95cfc fix(tests): fix spec test 2026-11-10 09:10:20 +01:00
Hadrien Blanc 6947441943 test(NGNet): tolerate IPv6 resolution of localhost on dual-stack hosts
NGSocketAddressFromString answers the first family returned by
getaddrinfo, and resolvers on dual-stack hosts may answer ::1 before
127.0.0.1 for localhost, so the IPv4 expectation for that name cannot be
guaranteed on every host.
2026-10-07 11:16:56 +02:00
Hadrien Blanc 20779cf353 fix(mail): sanitize the domain part of generated message-ids
generateMessageID: appended the substring following the last '@'
without sanitizing it, so a sender value such as 'Doe, John <a@b>'
produced 'Message-Id: <uuid@b>>' with a duplicated closing bracket on
calendar invitations. A nil domain also left the message-id
unterminated.

The domain part is now cut at the first address delimiter or
whitespace - a domain is a single token, and anything else would
allow header injection through generated message-ids.

Fixes #6201
2026-10-07 11:13:33 +02:00
smizrahi be3630d009 fix(mail): Keep content of Outlook downlevel-revealed conditional comments. Fixes #6167. 2026-10-02 17:25:02 +02:00
Hivert Quentin 10dc173349 fix(sanitization): update regex for html sanitization 2026-09-03 10:51:45 +02:00
Jan Kahmen 8813677ecb fix(core): keep the @import cleanup working in stringWithoutHTMLInjection
the trailing while loop reuses the regex variable, which by then points at the
angular brace pattern whenever stripAngular is YES. that pattern has two
capture groups while the loop substitutes $1@im****$3, so NSRegularExpression
raises NSInvalidArgumentException and the NS_HANDLER swallows it.

give the @import pattern its own variable and use it in both the replacement
and the loop. the replacement also used the template of the block above, which
dropped the whole style element instead of masking the @import in place, so
test_stringWithoutHTMLInjection failed. it passes again, and a case with
stripAngular YES covers the loop.
2026-08-17 23:03:41 +02:00
Hivert Quentin 1caa25711f fix(bug): incorrect method called 2026-08-11 17:06:27 +02:00
Hivert Quentin c45233c11e fix(pref): prevent onevent cleaning to remove legitimate words 2026-05-19 09:30:58 +02:00
Jordi Mallach e27b083213 Update onEvent test to match expectation after the XSS fixes 2026-05-12 13:19:09 +02:00
smizrahi 64f17880c7 fix(tests): Add timeout on all async tests 2024-09-26 21:02:50 +02:00
smizrahi 455fe97cbe feat(core): Add message of the day. Remove all html tags except for anchor tags (mobile only) 2024-01-29 17:16:08 +01:00
smizrahi 2146870071 fix(mail): Fix security @import css injection 2024-01-23 15:01:47 +00:00
Hivert Quentin 7481ccf370 fix(hmtl): prevent html injection of tag form 2023-11-06 14:04:53 +01:00
smizrahi 1c93796ae1 test(timeout): Change some timeouts fo tests 2023-08-17 11:27:04 +02:00
Hivert Quentin 528d178256 chore(packaging): debian 12 2023-08-02 11:36:36 +02:00
smizrahi f9fdad251d fix(mail): Removed invalid HTML tags in mail body. Fixes #5755 2023-06-07 14:42:21 +02:00
smizrahi 1a06996381 test(core): Add junit output format 2023-05-24 18:17:41 +02:00
smizrahi 754f3aa230 test(js): Increase test timeout for CI 2023-02-27 10:29:49 +01:00
smizrahi b1f84891b0 fix(security): Security fix for WSTG-INPV-02. Add unit test. 2022-11-23 09:34:54 +01:00
Francis Lachapelle 95eecc402a fix(dav): return 405 when collection already exists
See https://datatracker.ietf.org/doc/html/rfc4918#section-9.3.1
2022-08-09 12:17:55 -04:00
Francis Lachapelle 4e79a1e995 test: we now encode everything in XML documents 2022-08-04 16:15:45 -04:00
Francis Lachapelle 4f7981b1c3 test: improve TestNGMimeHeaderFieldGenerator 2022-08-04 16:09:33 -04:00
Francis Lachapelle ac602dd58c test: improve error message in localhost test 2022-08-04 16:06:06 -04:00
Nicolas Höft edd64a396e fix(core): adjustments for IPv6 2022-07-06 08:49:48 -04:00
Francis Lachapelle 5452cd7396 fix(calendar): filter by matching property values
Added test for calendar-query DAV request
2022-05-24 17:29:56 -04:00
Francis Lachapelle 5d2877cf0a test: add plus sign to timezone in Sieve script 2022-03-24 15:26:37 -04:00
Francis Lachapelle 896fe27c61 test: handle DST change in CalDAVSchedulingSpec.js 2022-03-11 10:28:44 -05:00
Francis Lachapelle 04ffc01768 test: temporary fix for CardDAVSpec.js 2022-03-01 17:48:29 -05:00
Francis Lachapelle d15e3b949f test: fix CardDAVSpec.js 2022-03-01 16:38:30 -05:00
Francis Lachapelle 7f31686bc5 test: fix CardDAVSpec.js 2022-03-01 07:52:53 -05:00
Francis Lachapelle 7faab9117a fix(addressbook(dav)): improve handling of addressbook-query 2022-02-28 17:07:39 -05:00
Francis Lachapelle e513a7242a test: fix DAVCalendarSuperUserAclTest 2022-01-24 08:29:59 -05:00
Francis Lachapelle bf36279e0e test: improve functions names related to sync-collection 2022-01-21 16:56:54 -05:00
Francis Lachapelle 2ecd441f32 feat(mail): enable autoreply on specific days or at a specific time
Fixes #5328
2021-12-02 14:20:47 -05:00
Francis Lachapelle e62dd42d2b test: simplify MailDAV test of mailboxes creation 2021-11-29 13:51:40 -05:00
Francis Lachapelle d70486f983 test: print response when MKCOL fails for a mailbox 2021-11-26 11:08:52 -05:00
Francis Lachapelle 1a7ba3d4ef test: migration from Python to JavaScript 2021-11-17 19:13:36 -05:00
Francis Lachapelle 71b67259c6 test: migration from Python to JavaScript 2021-11-16 21:51:13 -05:00
Francis Lachapelle a3e21cbf9d test: migration from Python to JavaScript 2021-11-16 17:14:36 -05:00
Francis Lachapelle 8eb255ad61 test: migration from Python to JavaScript 2021-11-16 15:23:55 -05:00
Francis Lachapelle 92820db3bb test: migration from Python to JavaScript 2021-11-10 06:31:25 -05:00
Francis Lachapelle ae637c49d5 test: migration from Python to JavaScript 2021-11-10 02:27:09 -05:00
Francis Lachapelle 7474967c4f test: migration from Python to JavaScript 2021-11-10 01:54:35 -05:00
Francis Lachapelle 54dae3bc28 test: migration from Python to JavaScript 2021-11-09 22:38:50 -05:00
Francis Lachapelle 8d294467ef test: migration from Python to JavaScript 2021-11-09 22:35:05 -05:00
Francis Lachapelle c860bf4f58 test: migration from Python to JavaScript 2021-11-09 21:56:11 -05:00