渡されたパラメータから画像を生成するCGIに、InterWikiを使用してパラメータを渡そうというhackです。
--- make_link_091208.php 2009-12-08 23:46:47.898723100 +0900 +++ make_link.php 2009-12-09 00:20:51.576164200 +0900 @@ -186,7 +186,7 @@ $this->body = $body; $this->type = $type; if (! PKWK_DISABLE_INLINE_IMAGE_FROM_URI && - is_url($alias) && preg_match('/\.(gif|png|jpe?g)$/i', $alias)) { + is_url($alias) && preg_match('/\.(gif|png|jpe?g)(\?|$)/i', $alias)) { $alias = '<img src="' . htmlspecialchars($alias) . '" alt="' . $name . '" />'; } else if ($alias != '') { if ($converter === NULL) @@ -522,6 +522,9 @@ $script . '?' . rawurlencode('[[' . $name . ':' . $this->param . ']]') : htmlspecialchars($url); + if (preg_match('/\.(gif|png|jpe?g)(\?|$)/i', $url)) + $alias = $this->url; + return parent::setParam( $page, htmlspecialchars($name . ':' . $this->param),
[http://localhost/diagram.php/.png? diagram] euc
[[diagram:message ここに書いたテキストが渡されます]]
<a href="http://localhost/diagram.php/.png?message%20%A4%B3%A4%B3%A4%CB%BD%F1%A4%A4%A4%BF%A5%C6%A5%AD%A5%B9%A5%C8%A4%AC%C5%CF%A4%B5%A4%EC%A4%DE%A4%B9" title="diagram:message ここに書いたテキストが渡されます" rel="nofollow"><img src="http://localhost/diagram.php/.png?message%20%A4%B3%A4%B3%A4%CB%BD%F1%A4%A4%A4%BF%A5%C6%A5%AD%A5%B9%A5%C8%A4%AC%C5%CF%A4%B5%A4%EC%A4%DE%A4%B9" alt="diagram:message ここに書いたテキストが渡されます" /></a>