end0tknr's kipple - web写経開発

太宰府天満宮の狛犬って、妙にカワイイ

CGI::param() for perl を リスト内で使うと、脆弱性につながるらしい

mod_perl環境に Devel::Cover を適用しようとしたら、次のようなエラー。
CGI::param() for perl を リスト内で使うと、脆弱性につながるらしい。

CGI::param called in list context from /home/endo/dev/.../Test.pm line 304,
this can lead to vulnerabilities.
See the warning in "Fetching the value or values of a single named parameter"
at /usr/local/lib/perl5/site_perl/5.18.4/CGI.pm line 404.


http://search.cpan.org/perldoc?CGI
同様のことは、CGI.pmのドキュメントに記載されていますが、
そのドキュメントによれば、

You can disable this warning by setting $CGI::LIST_CONTEXT_WARN to 0
or by using the multi_param() method instead.

らしいので、今回は、srcの先頭に次のように記載。

use CGI;
$CGI::LIST_CONTEXT_WARN = 0;