summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d8943d8)
When CGI->param is called in list context, such as in function
parameters, it expands to all the potentially multiple values
of the parameter: for instance, if we parse query string a=b&a=c&d=e
and call func($cgi->param('a')), that's equivalent to func('b', 'c').
Most of the functions we're calling do not expect that.
I do not believe this is an exploitable security vulnerability in
ikiwiki, but it was exploitable in Bugzilla.
return if ! defined $form->field("do") || ($form->field("do") ne "edit" && $form->field("do") ne "create") ;
return if ! defined $form->field("do") || ($form->field("do") ne "edit" && $form->field("do") ne "create") ;
- my $filename=Encode::decode_utf8($q->param('attachment'));
+ my $filename=Encode::decode_utf8(scalar $q->param('attachment'));
if (defined $filename && length $filename) {
attachment_store($filename, $form, $q, $params{session});
}
if (defined $filename && length $filename) {
attachment_store($filename, $form, $q, $params{session});
}
}
if ($form->submitted eq "Insert Links") {
}
if ($form->submitted eq "Insert Links") {
- my $page=quotemeta(Encode::decode_utf8($q->param("page")));
+ my $page=quotemeta(Encode::decode_utf8(scalar $q->param("page")));
my $add="";
foreach my $f ($q->param("attachment_select")) {
$f=Encode::decode_utf8($f);
my $add="";
foreach my $f ($q->param("attachment_select")) {
$f=Encode::decode_utf8($f);
my $page = shift;
if (!defined $page) {
my $page = shift;
if (!defined $page) {
- $page = IkiWiki::decode_utf8($q->param("page"));
+ $page = IkiWiki::decode_utf8(scalar $q->param("page"));
if (!defined $page) {
error("missing page parameter");
if (!defined $page) {
error("missing page parameter");
my $session=shift;
if ($q->param('do') eq 'blog') {
my $session=shift;
if ($q->param('do') eq 'blog') {
- my $page=titlepage(decode_utf8($q->param('title')));
+ my $page=titlepage(decode_utf8(scalar $q->param('title')));
$page=~s/(\/)/"__".ord($1)."__"/eg; # don't create subdirs
# if the page already exists, munge it to be unique
my $from=$q->param('from');
$page=~s/(\/)/"__".ord($1)."__"/eg; # don't create subdirs
# if the page already exists, munge it to be unique
my $from=$q->param('from');
}
elsif (defined $q->param('openid_identifier')) {
# myopenid.com affiliate support
}
elsif (defined $q->param('openid_identifier')) {
# myopenid.com affiliate support
- validate($q, $session, $q->param('openid_identifier'));
+ validate($q, $session, scalar $q->param('openid_identifier'));
my $cgi=shift;
my $session=shift;
if (defined $cgi->param('do') && $cgi->param('do') eq "poll") {
my $cgi=shift;
my $session=shift;
if (defined $cgi->param('do') && $cgi->param('do') eq "poll") {
- my $choice=decode_utf8($cgi->param('choice'));
+ my $choice=decode_utf8(scalar $cgi->param('choice'));
if (! defined $choice || not length $choice) {
error("no choice specified");
}
if (! defined $choice || not length $choice) {
error("no choice specified");
}
# on it.
$oldcgi->param("editcontent",
renamepage_hook($dest, $src, $dest,
# on it.
$oldcgi->param("editcontent",
renamepage_hook($dest, $src, $dest,
- $oldcgi->param("editcontent")));
+ scalar $oldcgi->param("editcontent")));
# Get a new edit token; old was likely invalidated.
$oldcgi->param("rcsinfo",
# Get a new edit token; old was likely invalidated.
$oldcgi->param("rcsinfo",
if ($q->param("do") eq 'rename') {
my $session=shift;
if ($q->param("do") eq 'rename') {
my $session=shift;
- my ($form, $buttons)=rename_form($q, $session, Encode::decode_utf8($q->param("page")));
+ my ($form, $buttons)=rename_form($q, $session, Encode::decode_utf8(scalar $q->param("page")));
IkiWiki::decode_form_utf8($form);
my $src=$form->field("page");
IkiWiki::decode_form_utf8($form);
my $src=$form->field("page");
IkiWiki::Plugin::attachment::is_held_attachment($src);
if ($held) {
rename($held, IkiWiki::Plugin::attachment::attachment_holding_location($dest));
IkiWiki::Plugin::attachment::is_held_attachment($src);
if ($held) {
rename($held, IkiWiki::Plugin::attachment::attachment_holding_location($dest));
- postrename($q, $session, $src, $dest, $q->param("attachment"))
+ postrename($q, $session, $src, $dest, scalar $q->param("attachment"))
unless defined $srcfile;
}
unless defined $srcfile;
}
$renamesummary.=$template->output;
}
$renamesummary.=$template->output;
}
- postrename($q, $session, $src, $dest, $q->param("attachment"));
+ postrename($q, $session, $src, $dest, scalar $q->param("attachment"));
}
else {
IkiWiki::showform($form, $buttons, $session, $q);
}
else {
IkiWiki::showform($form, $buttons, $session, $q);