Pedro M. Baeza
1be50fdeaf
[ADD] *: support SVG images
...
Introduce official support for SVG files in the framework, including the
following parts:
1. When client-side SVG images are uploaded, the content is displayed until
you save using data URI scheme according RFC 2397 [1]. This scheme requires
to specify content format. Using hardcoded "image/png" works for all images
types except SVG.
Type-sniffing is done using "magic byte" detection via the first base64
encode byte, so that the proper data URI scheme can be used.
This should not cause SVG-related security problems as the file is
displayed through `<img>` tag, which does not allow SVG scripting [2].
2. Make /web/image controller compatible with SVG
3. Add support for SVG files for company logo, which uses a dedicated
controller.
4. Resizing of SVG files is a no-op, as it makes little sense for a
vector-based format. We also want to avoid micro-alterations to the SVG
document (in "natural" viewport parameters) as we would store multiple
copies of the files in the filestore.
5. Because SVG files are inherently dangerous, upload of SVG files is
restricted to administrators, either by blocking it directly before
saving it in the database (binary fields with attachment=False), or by
neutering them to text/plain mimetype (for binary fields with
attachment=True)
6. Add tests for the SVG upload cases and for the non-admin uploads.
[1] https://tools.ietf.org/html/rfc2397
[2] https://www.w3.org/wiki/SVG_Security
Closes #26635
2018-10-03 17:48:01 +02:00
..
2018-10-02 17:09:23 +02:00
2018-09-30 07:02:39 +02:00
2018-09-30 07:02:39 +02:00
2018-09-30 02:25:45 +02:00
2018-09-30 02:25:45 +02:00
2018-09-07 09:17:28 +02:00
2018-10-01 16:01:54 +02:00
2018-09-25 15:32:59 +02:00
2018-09-30 07:02:39 +02:00
2018-10-02 20:54:00 +02:00
2018-09-30 07:02:39 +02:00
2018-09-23 02:29:29 +02:00
2018-09-30 07:02:39 +02:00
2018-09-30 02:25:45 +02:00
2018-10-02 20:54:00 +02:00
2018-10-02 20:54:00 +02:00
2018-09-30 07:02:39 +02:00
2018-09-30 02:25:45 +02:00
2018-09-30 02:25:45 +02:00
2018-09-23 07:02:35 +02:00
2018-09-30 07:02:39 +02:00
2018-10-02 13:15:40 +02:00
2018-09-23 07:02:35 +02:00
2018-09-30 07:02:39 +02:00
2018-10-03 16:54:25 +02:00
2018-09-30 07:02:39 +02:00
2018-09-30 02:25:45 +02:00
2018-09-30 02:25:45 +02:00
2018-09-30 02:25:45 +02:00
2018-09-30 02:25:45 +02:00
2018-10-02 19:05:01 +02:00
2018-10-01 16:01:54 +02:00
2018-09-30 02:25:45 +02:00
2018-09-30 02:25:45 +02:00
2018-10-02 22:03:22 +02:00
2018-09-23 02:29:29 +02:00
2018-09-30 02:25:45 +02:00
2018-09-30 02:25:45 +02:00
2018-10-02 13:15:40 +02:00
2018-09-23 02:29:29 +02:00
2018-10-01 17:02:26 +02:00
2018-10-02 13:15:40 +02:00
2018-10-01 16:01:54 +02:00
2018-09-30 02:25:45 +02:00
2018-09-23 02:29:29 +02:00
2018-09-30 02:25:45 +02:00
2018-10-02 17:09:23 +02:00
2018-10-02 12:35:34 +02:00
2018-09-23 02:29:29 +02:00
2018-09-23 02:29:29 +02:00
2018-09-30 02:25:45 +02:00
2018-10-01 18:28:51 +02:00
2018-09-30 02:25:45 +02:00
2018-10-02 17:09:24 +02:00
2018-10-02 17:09:24 +02:00
2018-10-02 17:09:24 +02:00
2018-10-02 17:09:24 +02:00
2018-09-27 12:10:23 +02:00
2018-09-25 15:32:59 +02:00
2018-10-02 17:09:24 +02:00
2018-09-23 02:29:29 +02:00
2018-09-23 02:29:29 +02:00
2018-09-30 02:25:45 +02:00
2018-09-25 15:32:59 +02:00
2018-10-02 17:09:24 +02:00
2018-09-27 12:10:23 +02:00
2018-09-30 02:25:45 +02:00
2018-09-23 02:29:29 +02:00
2018-09-30 02:25:45 +02:00
2018-09-25 23:01:40 +02:00
2018-10-02 14:27:11 +02:00
2018-10-01 16:34:30 +02:00
2018-09-25 23:01:40 +02:00
2018-09-25 23:01:40 +02:00
2018-10-02 08:38:21 +02:00
2018-09-25 23:01:40 +02:00
2018-09-25 23:01:40 +02:00
2018-10-02 13:15:40 +02:00
2018-09-30 02:25:45 +02:00
2018-10-02 13:15:40 +02:00
2018-09-30 02:25:45 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-09-19 15:58:10 +02:00
2018-09-19 16:11:51 +02:00
2018-09-27 12:10:23 +02:00
2018-09-27 12:10:23 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-10-02 12:35:34 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-09-14 16:06:41 +02:00
2018-10-01 11:27:51 +02:00
2018-10-01 16:01:54 +02:00
2018-10-01 16:01:54 +02:00
2018-09-29 11:12:39 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-10-01 16:01:54 +02:00
2018-09-18 15:58:44 +02:00
2018-09-28 13:39:26 +02:00
2018-09-27 12:10:23 +02:00
2018-09-18 14:30:04 +02:00
2018-09-28 13:39:26 +02:00
2018-09-28 13:39:26 +02:00
2018-09-26 18:31:38 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-10-01 11:27:51 +02:00
2018-09-28 13:39:26 +02:00
2018-09-18 15:58:44 +02:00
2018-10-01 11:27:51 +02:00
2018-10-01 11:27:51 +02:00
2018-09-18 15:58:44 +02:00
2018-09-23 00:28:15 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-09-26 15:56:11 +02:00
2018-09-18 15:58:44 +02:00
2018-09-27 12:10:23 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-09-18 15:58:44 +02:00
2018-09-23 02:29:29 +02:00
2018-09-30 02:25:45 +02:00
2018-10-02 17:29:30 +02:00
2018-10-02 13:15:40 +02:00
2018-10-02 20:54:00 +02:00
2018-10-02 16:54:41 +02:00
2018-10-02 16:03:26 +02:00
2018-09-30 02:25:45 +02:00
2018-09-23 02:29:29 +02:00
2018-10-02 16:03:26 +02:00
2018-10-02 17:09:23 +02:00
2018-10-02 13:15:40 +02:00
2018-10-02 13:15:40 +02:00
2018-09-30 02:25:45 +02:00
2018-10-02 17:09:23 +02:00
2018-09-23 02:29:29 +02:00
2018-09-30 02:25:45 +02:00
2018-09-23 02:29:29 +02:00
2018-10-02 13:15:40 +02:00
2018-09-21 14:02:22 +02:00
2018-10-02 12:35:34 +02:00
2018-09-23 02:29:29 +02:00
2018-09-30 02:25:45 +02:00
2018-09-23 02:29:29 +02:00
2018-10-02 01:03:03 +02:00
2018-09-25 15:32:59 +02:00
2018-09-23 02:29:29 +02:00
2018-10-01 16:01:54 +02:00
2018-09-25 15:32:59 +02:00
2018-09-23 02:29:29 +02:00
2018-09-30 02:25:45 +02:00
2018-10-02 17:09:24 +02:00
2018-10-01 21:33:32 +02:00
2018-09-30 02:25:45 +02:00
2018-09-30 02:25:45 +02:00
2018-10-02 13:15:40 +02:00
2018-09-25 15:32:59 +02:00
2018-09-30 02:25:45 +02:00
2018-09-30 02:25:45 +02:00
2018-09-23 02:29:29 +02:00
2018-10-02 17:09:23 +02:00
2018-09-30 02:25:45 +02:00
2018-09-30 02:25:45 +02:00
2018-09-25 15:32:59 +02:00
2018-10-02 17:09:24 +02:00
2018-09-30 02:25:45 +02:00
2018-10-02 17:09:24 +02:00
2018-09-23 02:29:29 +02:00
2018-09-30 02:25:45 +02:00
2018-10-01 16:01:54 +02:00
2018-09-30 02:25:45 +02:00
2018-10-02 20:54:00 +02:00
2018-09-30 02:25:45 +02:00
2018-10-02 17:09:23 +02:00
2018-09-30 02:25:45 +02:00
2018-09-30 02:25:45 +02:00
2018-10-02 13:15:40 +02:00
2018-09-30 02:25:45 +02:00
2018-10-01 16:01:54 +02:00
2018-09-30 02:25:45 +02:00
2018-09-30 02:25:45 +02:00
2018-10-02 13:15:40 +02:00
2018-09-30 02:25:45 +02:00
2018-09-30 02:25:45 +02:00
2018-09-30 02:25:45 +02:00
2018-10-02 13:15:40 +02:00
2018-09-30 02:25:45 +02:00
2018-09-23 02:29:29 +02:00
2018-10-02 13:15:40 +02:00
2018-10-02 12:35:34 +02:00
2018-09-23 02:29:29 +02:00
2018-10-01 16:01:54 +02:00
2018-09-30 02:25:45 +02:00
2018-09-30 02:25:45 +02:00
2018-10-02 17:09:24 +02:00
2018-09-23 02:29:29 +02:00
2018-10-02 16:05:17 +02:00
2018-10-02 16:52:18 +02:00
2018-09-30 02:25:45 +02:00
2018-09-16 07:08:38 +02:00
2018-09-23 02:29:29 +02:00
2018-09-30 02:25:45 +02:00
2018-09-30 02:25:45 +02:00
2018-10-03 17:48:01 +02:00
2018-09-30 02:25:45 +02:00
2018-10-03 17:48:01 +02:00
2018-09-23 02:29:29 +02:00
2018-09-30 02:25:45 +02:00
2018-09-30 02:25:45 +02:00
2018-09-30 02:25:45 +02:00
2018-10-02 16:18:48 +02:00
2018-10-02 13:15:40 +02:00
2018-09-30 19:55:17 +02:00
2018-09-30 19:55:17 +02:00
2018-09-30 19:55:17 +02:00
2018-10-02 13:15:40 +02:00
2018-09-23 02:29:29 +02:00
2018-09-26 14:50:17 +02:00
2018-09-30 19:55:17 +02:00
2018-09-30 02:25:45 +02:00
2018-10-02 13:15:40 +02:00
2018-09-23 02:29:29 +02:00
2018-10-01 21:33:32 +02:00
2018-09-30 19:55:17 +02:00
2018-09-30 19:55:17 +02:00
2018-10-02 13:15:40 +02:00
2018-09-23 02:29:29 +02:00
2018-09-30 19:55:17 +02:00
2018-09-30 19:55:17 +02:00
2018-09-30 19:55:17 +02:00
2018-09-30 19:55:17 +02:00
2018-09-23 02:29:29 +02:00
2018-09-27 12:10:23 +02:00
2018-10-02 17:09:23 +02:00
2018-10-01 13:29:09 +02:00
2018-10-01 16:01:54 +02:00
2018-09-25 15:32:59 +02:00
2018-09-30 02:25:45 +02:00
2018-09-23 02:29:29 +02:00
2018-09-30 02:25:45 +02:00
2018-10-01 13:29:09 +02:00
2018-10-03 17:48:01 +02:00
2018-09-30 02:25:45 +02:00
2018-09-30 02:25:45 +02:00