]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/finer_control_over___60__object___47____62__s.mdwn
Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info
[ikiwiki.git] / doc / todo / finer_control_over___60__object___47____62__s.mdwn
1 IIUC, the current version of [HTML::Scrubber][] allows for the `object` tags to be either enabled or disabled entirely.  However, while `object` can be used to add *code* (which is indeed a potential security hole) to a document, reading [Objects, Images, and Applets in HTML documents][objects-html] reveals that the “dangerous” are not all the `object`s, but rather those having the following attributes:
2
3     classid     %URI;          #IMPLIED  -- identifies an implementation --
4     codebase    %URI;          #IMPLIED  -- base URI for classid, data, archive--
5     codetype    %ContentType;  #IMPLIED  -- content type for code --
6     archive     CDATA          #IMPLIED  -- space-separated list of URIs --
7
8 It seems that the following attributes are, OTOH, safe:
9
10     declare     (declare)      #IMPLIED  -- declare but don't instantiate flag --
11     data        %URI;          #IMPLIED  -- reference to object's data --
12     type        %ContentType;  #IMPLIED  -- content type for data --
13     standby     %Text;         #IMPLIED  -- message to show while loading --
14     height      %Length;       #IMPLIED  -- override height --
15     width       %Length;       #IMPLIED  -- override width --
16     usemap      %URI;          #IMPLIED  -- use client-side image map --
17     name        CDATA          #IMPLIED  -- submit as part of form --
18     tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
19
20 Should the former attributes be *scrubbed* while the latter left intact, the use of the `object` tag would seemingly become safe.
21
22 Note also that allowing `object` (either restricted in such a way or not) automatically solves the [[/todo/svg]] issue.
23
24 For Ikiwiki, it may be nice to be able to restrict [URI's][URI] (as required by the `data` and `usemap` attributes) to, say, relative and `data:` (as per [RFC 2397][]) ones as well, though it requires some more consideration.
25
26 — [[Ivan_Shmakov]], 2010-03-12Z.
27
28 [[wishlist]]
29
30 ## See also
31
32 * [Objects, Images, and Applets in HTML documents][objects-html]
33 * [[plugins/htmlscrubber|/plugins/htmlscrubber]]
34 * [[todo/svg|/todo/svg]]
35 * [RFC 2397: The “data” URL scheme. L. Masinter. August 1998.][RFC 2397]
36 * [Uniform Resource Identifier — the free encyclopedia][URI]
37
38 [HTML::Scrubber]: http://search.cpan.org/~podmaster/HTML-Scrubber-0.08/Scrubber.pm
39 [objects-html]: http://www.w3.org/TR/1999/REC-html401-19991224/struct/objects.html
40 [RFC 2397]: http://tools.ietf.org/html/rfc2397
41 [URI]: http://en.wikipedia.org/wiki/Uniform_Resource_Identifier