]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - ikiwiki-update-wikilist
passwordauth: prevent authentication bypass via multiple name parameters
[git.ikiwiki.info.git] / ikiwiki-update-wikilist
index 0b52543cda5bdfb3a1b1e6bbd03a0a697210a141..1976f7ed1e3c3a65bc517abbb34aaafac103c147 100755 (executable)
@@ -30,6 +30,9 @@ while (<$list>) {
                                $seen=1;
                                push @lines, $_;
                        }
                                $seen=1;
                                push @lines, $_;
                        }
+                       else {
+                               $changed=1;
+                       }
                }
                else {
                        push @lines, $_;
                }
                else {
                        push @lines, $_;
@@ -45,7 +48,7 @@ if (! $seen && ! $remove) {
 }
 if ($changed) {
        close $list || die "ikiwiki-update-wikilist: error reading $list: $!\n";
 }
 if ($changed) {
        close $list || die "ikiwiki-update-wikilist: error reading $list: $!\n";
-       open ($list, ">$wikilist") || die "ikiwiki-update-wikilist: error writing $wikilist: $!\n";
+       open ($list, ">$wikilist") || die "ikiwiki-update-wikilist: cannot write to $wikilist\n";
        foreach (@lines) {
                print $list "$_\n";
        }
        foreach (@lines) {
                print $list "$_\n";
        }