]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/__42__forward__42__ing_functionality_for_the_meta_plugin.mdwn
web commit by tschwinge: Add a *Discussion* header.
[ikiwiki.git] / doc / todo / __42__forward__42__ing_functionality_for_the_meta_plugin.mdwn
1 Here is a patch [[tag patch]] to add a *forward*ing functionality
2 to the [[`meta`_plugin|plugins/meta]].
3
4 Find the most recent version at
5 <http://www.schwinge.homeip.net/~thomas/tmp/meta_forward.patch>.
6
7 I can't use `scrub(...)`, as that will strip out the forwarding HTML command.
8 How to deal with that?
9
10 I can also submit a Git patch, if desired.
11
12
13 # Syntax
14
15 **URL** = http://some.nice/place/ (*etc.*)
16
17 **WHITHER** = \[\[**[[wikilink]]**]] | **URL**
18
19 **D** = natural number (*meaning seconds*)
20
21 **OPT_DELAY** = delay=**D** | empty (*immediatelly*)
22
23 \[[meta forward="**WHITHER**" **OPT_DELAY**]]
24
25
26 # Extensions and Ideas
27
28 It might be doable to add references to pages that refer to the page containg
29 the forwarding statement also to the referred-to page.
30
31 --[[tschwinge]]
32
33
34 # Discussion
35
36 > The html scrubber cannot scrub meta headers. So if you emit one
37 > containing user-supplied data, it's up to you to scrub it to avoid all
38 > possible XSS attacks. Two attacks I'd worry about are cyclic meta refresh
39 > loops, which some, but not all web browsers detect and break, and any way
40 > to insert javascript via the user-supplied parameters. (Ie, putting
41 > something in the delay value that closes the tag can probably insert
42 > javascript ATM; and are there ways to embed javascript in the url?)
43 > --[[Joey]]
44
45 >> OK.  I can add code to make sure that `$delay` **D** indeed is a natural number
46 >> and that the passed target address **WHITHER** is nothing but a valid target address.
47 >> (How to qualify a valid target address?)
48 >> What is a *cyclic meta refresh loop*?  Two pages in turn forwarding to each other?
49 >> I think it would be possible to implement such a guard when only in-wiki links
50 >> ([[wikilink]]s) are being used, but how to do so for external links?  --[[tschwinge]]