Commit graph

85 commits

Author SHA1 Message Date
Francis Lachapelle e714a3f42b fix(mail(css)): improve CSS sanitization of at-rules
Fixes #5387
2021-09-08 11:38:53 -04:00
Francis Lachapelle 69972f725c fix(mail): remove media event handlers from HTML messages
Fixes #5369
2021-08-02 17:42:02 -04:00
Francis Lachapelle 72321ec545 fix(mail(css)): improve HTML sanitization of background attribute 2021-04-06 16:49:05 -04:00
Francis Lachapelle d1dbceb407 fix(mail): remove onpointerrawupdate event handler from HTML messages
Fixes #4979
2020-03-06 12:14:46 -05:00
Francis Lachapelle bc963d53c6 fix(mail): wrap HTML part before re-encoding content
Avoid improper encoding when the HTML part is using an unsupported
encoding by libxml2.
2020-01-30 15:36:16 -05:00
Francis Lachapelle 47075b40a2 fix(mail): wrap HTML part with HTML tags to render all content 2019-12-04 15:45:26 -05:00
Ludovic Marcotte 849c34306a (fix) properly handle Windows-1256 charaset (fixes #4781) 2019-08-01 11:15:17 -04:00
Ludovic Marcotte 4fc515b229 (fix) handle more broken mails (fixes #4513) 2019-06-13 13:54:16 -04:00
Francis Lachapelle 0e918a446a Add rel="noopener" to external links
Fixes #4764
2019-06-10 13:20:44 -04:00
Francis Lachapelle f8cd3fb29c HTML mail: assume body never ends
Fixes #4492
2018-06-27 15:32:54 -04:00
Francis Lachapelle fe362b9f49 (css) Improve server-side CSS sanitizer
Remove HTML comment delimiters, remove CSS comments, really remove
at-rules, really add !important suffix.
2018-06-07 12:33:38 -04:00
Francis Lachapelle bca655ffdd (css) Fix server-side CSS cleaner
Fixes #4366
2018-01-17 13:58:42 -05:00
Ludovic Marcotte 502b59bc08 (feat) handling of encypted HTML parts 2017-12-23 09:02:32 -05:00
Ludovic Marcotte b6d657d001 (fix) generalized HTML sanitization to avoid encoding issues when replying/forwarding mails
Conflicts:
	SoObjects/Mailer/NSData+Mail.m
2017-10-18 09:41:45 -04:00
Francis Lachapelle c6dbb88dc1 Simplify sanitization of accepted HTML attributes
This will avoid converting & to an HTML entity.
2017-08-22 10:02:28 -04:00
Francis Lachapelle b3f541b87e Sanitize whitelisted attributes of HTML tags 2017-06-05 15:14:48 -04:00
Ludovic Marcotte 7582ec8462 Updated comment 2017-04-20 14:35:44 -04:00
Ludovic Marcotte 0091ff749a (fix) handle properly windows-1255 charset (fixes #4124) 2017-04-20 14:29:15 -04:00
Francis Lachapelle 4a21a02f98 Fix rendering of forwarded HTML message with img
Fixes #3981 (cont'd)
2017-01-13 12:23:38 -05:00
Francis Lachapelle e5d0b0b0ca Fix rendering of forwarded HTML message with img
Fixes #3981 (partially)
2017-01-11 16:08:56 -05:00
Ludovic Marcotte 2a2ebd553e (test) handle sanitization before passing data to libxml 2016-12-06 14:05:27 -05:00
Francis Lachapelle 45290c6414 Improve CSS sanitizer for HTML messages
At-rules are now completely removed. Fixed a possible issue where the
first rule would not be prefixed by our CSS selector.

Fixes #3700
2016-05-27 13:42:44 -04:00
Ludovic Marcotte 74602de1db (fix) make sure found tag is always defined 2016-05-06 08:14:37 -04:00
Patrice Levesque 7c25b53fdf Remove pointless #imports from .m and .h files
This was done with a brute-force approach, ensuring no additional
warnings from GCC 4.9 under x86_64.
2016-02-13 16:11:52 -05:00
Ludovic Marcotte bdfe95a7fb (fix) fixed wrong comparison of meta vs. META tag in HTML mails
Conflicts:

	NEWS
2015-11-06 09:28:46 -05:00
Euan Thoms 3c62cc744e Stage 1 of clang compiler warning patches. 2015-10-31 14:10:03 +08:00
Ludovic Marcotte 12875539bb (fix) fallback to utf-8/latin1 in rare decoding error cases - this is ugly 2015-07-23 11:21:25 -04:00
Francis Lachapelle 4cc158043e Improve CSS server-side cleaner
Fixes #3040
2015-01-28 16:38:27 -05:00
Ludovic Marcotte e2bee23021 Avoid unnecessary calls to NSLog 2015-01-22 16:25:16 -05:00
Ludovic Marcotte 08cd080d47 Fixed charset substitution in meta tags 2014-07-21 15:34:56 -04:00
Ludovic Marcotte 333b561a59 Applied patch from bug #2736 2014-06-16 15:30:26 -04:00
Ludovic Marcotte 19a95a1818 Applied fix from #2809 2014-06-10 08:58:44 -04:00
Ludovic Marcotte 619cb2c0ec Fix for bug #2721 2014-04-23 09:22:20 -04:00
Francis Lachapelle d603a8672e Consider 'background' attribute as unsafe
When loading a message, background attributes will be disabled if the
user as chosen to not automatically load external images.

Fixes #2437
2014-01-09 09:15:49 -05:00
Francis Lachapelle dc21c723f6 Move method fetchFileAttachmentKeys from category
Moved fetchFileAttachmentKeys from SOGoDraftObjectExtensions to
SOGoDraftObject. Renamed fetchAttachmentIds to fetchFileAttachmentIds
for consistency.
2013-12-20 15:20:16 -05:00
Ludovic Marcotte e4aedbac08 <img src=data...> conversion to file attachments + CIDs. 2013-11-20 08:56:29 -05:00
Ludovic Marcotte 0f3e31ebf1 Added more tags to skip 2013-10-23 16:37:03 -04:00
Ludovic Marcotte 87261f3280 Fix for bug #2468. 2013-10-23 16:04:37 -04:00
Ludovic Marcotte 16f62e2393 Fix for bug #2434 2013-10-18 10:30:43 -04:00
Francis Lachapelle 854bce28fb Fix condition in UIxMailPartHTMLViewer 2013-06-03 12:07:18 -04:00
Francis Lachapelle 49e964c529 Fix decoding charset parameter
To avoid a libxml bug/limitation, we were already stripping the charset
parameter, but we were not considering the single quote as valid
delimiter.
2013-06-03 11:47:48 -04:00
Ludovic Marcotte ef7c69eda7 Now consider "utf8" crap as "utf-8", coming from bad mailers. 2012-12-03 14:56:11 -05:00
Francis Lachapelle 6bf0a28c5c See ChangeLog
Monotone-Parent: c3154515eeade57787d4fb276b1cd5ba9bd7488d
Monotone-Revision: 0942f75d4ff9b5111c95d1cd9bee0a65f57f888b

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2012-08-24T19:58:04
2012-08-24 19:58:04 +00:00
Francis Lachapelle 5c618e5638 Improved HTML of mail notifications. See ChangeLog.
Monotone-Parent: 8ce46d6fa7b1d1a9d12069cee3ba796d99d668d2
Monotone-Revision: 5a6d160e6f9616edb725a40e08f24f0f0bf539b0

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2012-07-20T18:34:59
2012-07-20 18:34:59 +00:00
Francis Lachapelle 0fb6bbc836 Monotone-Parent: 29fffc5b150efb565af943e7fd8387e446ceb042
Monotone-Revision: 92638e02e3b38087e427f0604b8dd774e09d2001

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2012-02-07T23:48:57
2012-02-07 23:48:57 +00:00
Francis Lachapelle 34cc7a27dc Monotone-Parent: 8b85752325ab90167923684643ea6fe0374ee7a1
Monotone-Revision: 29fffc5b150efb565af943e7fd8387e446ceb042

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2012-02-07T23:47:25
2012-02-07 23:47:25 +00:00
Wolfgang Sourdeau b7077e74de Monotone-Parent: 6abb8375831082425cff443adae2a3a663f43a6d
Monotone-Revision: 8b85752325ab90167923684643ea6fe0374ee7a1

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-02-10T10:42:33
2012-02-10 10:42:33 +00:00
Francis Lachapelle b159c2c879 See ChangeLog.
Monotone-Parent: 361e773d3d8846808f8d0ac504cac38d25cbff5c
Monotone-Revision: e9f628c74b83c2316c49865e04b473c6e202c332

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2012-02-07T23:08:46
2012-02-07 23:08:46 +00:00
Ludovic Marcotte 1376d8654a Fixed handling of gb2312 charset
Monotone-Parent: 6b4e2f16b2a1ac3bbbb8f854763b7deb70bd8a46
Monotone-Revision: addfe836292fcae874e765a05ef776bfe841be1d

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2011-07-29T13:26:14
Monotone-Branch: ca.inverse.sogo
2011-07-29 13:26:14 +00:00
Ludovic Marcotte 180c838a8a small fix over previous commit
Monotone-Parent: 5fb0fae471bb22f9c4ce7361ef22d9d213f30c0b
Monotone-Revision: 4120c09ec69b99d41cd339f49faa9ae17aa03b61

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2011-05-17T12:08:22
Monotone-Branch: ca.inverse.sogo
2011-05-17 12:08:22 +00:00