Do not pass ignored sid parameter to checksessionexpiry
authorSimon McVittie <smcv@debian.org>
Sat, 11 Oct 2014 08:28:02 +0000 (09:28 +0100)
committerSimon McVittie <smcv@debian.org>
Sun, 12 Oct 2014 17:03:57 +0000 (18:03 +0100)
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
IkiWiki/Plugin/recentchanges.pm
IkiWiki/Plugin/remove.pm
IkiWiki/Plugin/rename.pm

index 3047869c4a0ad4da75f715937b8fff185dc80970..78d0704c7fd3b699acbb65df391e475b29fae52b 100644 (file)
@@ -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";
 
index eec9803be1397dc0a473b5c4287a0b8cdfa25ac7..2b2f43b7ae19fa89a2facf4ba02aca4b66ed671a 100644 (file)
@@ -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')) {
index d48b28f955043ec347dd87879a789c0830dfa5ab..5c99b387e9c7ced1fd99518de3177033b29eeeaa 100644 (file)
@@ -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");
                        
index 8387a1e32446753f749887ba5655d23c2dfce462..f7ea21b5355aed4942defb8102b1af0088059cc0 100644 (file)
@@ -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.