Call CGI->param_fetch instead of CGI->param in array context
authorAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>
Wed, 15 Oct 2014 21:32:02 +0000 (22:32 +0100)
committerSimon McVittie <smcv@debian.org>
Thu, 16 Oct 2014 21:24:47 +0000 (22:24 +0100)
commitcfbcbda0ad848334640ad849ed618873ecba8eb4
treef69b27dcfec192eb881cd8741dcb1dc92b955440
parentf4ec7b06d97c8406c5f5be7332ead2f28c271371
Call CGI->param_fetch instead of CGI->param in array context

CGI->param has the misfeature that it is context-sensitive, and in
particular can expand to more than one scalar in function calls.
This led to a security vulnerability in Bugzilla, and recent versions
of CGI.pm will warn when it is used in this way.

In the situations where we do want to cope with more than one parameter
of the same name, CGI->param_fetch (which always returns an
array-reference) makes the intention clearer.

[commit message added by smcv]
IkiWiki/CGI.pm
IkiWiki/Plugin/attachment.pm