From 17fccbca94aafc112fd72929ba4e7205ceedc287 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 11 Oct 2014 09:28:02 +0100 Subject: [PATCH] Do not pass ignored sid parameter to checksessionexpiry checksessionexpiry's signature changed from (CGI::Session, CGI->param('sid')) to (CGI, CGI::Session) in commit 985b229b, but editpage still passed the sid as a useless third parameter, and this was later cargo-culted into remove, rename and recentchanges. --- IkiWiki/Plugin/editpage.pm | 2 +- IkiWiki/Plugin/recentchanges.pm | 2 +- IkiWiki/Plugin/remove.pm | 2 +- IkiWiki/Plugin/rename.pm | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/IkiWiki/Plugin/editpage.pm b/IkiWiki/Plugin/editpage.pm index 3047869c4..78d0704c7 100644 --- a/IkiWiki/Plugin/editpage.pm +++ b/IkiWiki/Plugin/editpage.pm @@ -342,7 +342,7 @@ sub cgi_editpage ($$) { else { # save page check_canedit($page, $q, $session); - checksessionexpiry($q, $session, $q->param('sid')); + checksessionexpiry($q, $session); my $exists=-e "$config{srcdir}/$file"; diff --git a/IkiWiki/Plugin/recentchanges.pm b/IkiWiki/Plugin/recentchanges.pm index eec9803be..2b2f43b7a 100644 --- a/IkiWiki/Plugin/recentchanges.pm +++ b/IkiWiki/Plugin/recentchanges.pm @@ -102,7 +102,7 @@ sub sessioncgi ($$) { IkiWiki::decode_form_utf8($form); if ($form->submitted eq 'Revert' && $form->validate) { - IkiWiki::checksessionexpiry($q, $session, $q->param('sid')); + IkiWiki::checksessionexpiry($q, $session); my $message=sprintf(gettext("This reverts commit %s"), $rev); if (defined $form->field('revertmessage') && length $form->field('revertmessage')) { diff --git a/IkiWiki/Plugin/remove.pm b/IkiWiki/Plugin/remove.pm index d48b28f95..5c99b387e 100644 --- a/IkiWiki/Plugin/remove.pm +++ b/IkiWiki/Plugin/remove.pm @@ -219,7 +219,7 @@ sub sessioncgi ($$) { postremove($session); } elsif ($form->submitted eq 'Remove' && $form->validate) { - IkiWiki::checksessionexpiry($q, $session, $q->param('sid')); + IkiWiki::checksessionexpiry($q, $session); my @pages=$form->field("page"); diff --git a/IkiWiki/Plugin/rename.pm b/IkiWiki/Plugin/rename.pm index 8387a1e32..f7ea21b53 100644 --- a/IkiWiki/Plugin/rename.pm +++ b/IkiWiki/Plugin/rename.pm @@ -305,7 +305,7 @@ sub sessioncgi ($$) { postrename($q, $session, $src); } elsif ($form->submitted eq 'Rename' && $form->validate) { - IkiWiki::checksessionexpiry($q, $session, $q->param('sid')); + IkiWiki::checksessionexpiry($q, $session); # These untaints are safe because of the checks # performed in check_canrename later. -- 2.39.5