1 [[template id=plugin name=graphviz author="[[JoshTriplett]]"]]
2 [[tag type/chrome type/format]]
4 This plugin allows embedding [graphviz](http://www.graphviz.org/) graphs in a
7 \[[graph src="a -> b -> c; a -> c;"]]
9 Note that graphs will only show up in previews if your browser has
10 [[wikipedia data: URI]] support, or if the same graph already exists on that
13 Security implications: graphviz does not seem to have any syntax exploitable to
14 perform file access or shell commands on the server. However, the graphviz
15 plugin does make denial of service attacks somewhat easier: any user with edit
16 privileges can use this plugin to create large files without the need to send
17 large amounts of data, allowing them to more quickly fill the disk, run the
18 server out of memory, or use up large amounts of bandwidth. Any user can
19 already do these things with just the core of ikiwiki, but the graphviz plugin
20 allows for an amplification attack, since users can send less data to use large
21 amounts of processing time and disk usage.
23 The `graph` directive supports the following parameters:
25 - `src` - The graphviz source to render.
26 - `type` - The type of graph to render: `graph` or `digraph`. Defaults to
28 - `prog` - The graphviz program to render with: `dot`, `neato`, `fdp`, `twopi`,
29 or `circo`. Defaults to `dot`.
30 - `height`, `width` - Limit the size of the graph to a given height and width,
31 in inches. You must specify both to limit the size; otherwise, graphviz will
32 choose a size, without any limit.
34 [[if test="enabled(graphviz)" then="""
37 [[graph src="a -> b -> c; a -> b;"]]
38 [[graph src="a -- b -- c -- a;" prog="circo" type="graph"]]
41 This plugin uses the [[cpan Digest::SHA1]] perl module.