]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/passwordauth.pm
git: use parameters, not global state, to swap working directory
[git.ikiwiki.info.git] / IkiWiki / Plugin / passwordauth.pm
index 3bdd9de2ed01919ab2fa6559ba6658977bac7628..fb3fd9ee1620911558ec09c96b466405a3a0592a 100644 (file)
@@ -231,7 +231,7 @@ sub formbuilder_setup (@) {
                                $form->field(
                                        name => "password",
                                        validate => sub {
-                                               checkpassword($form->field("name"), shift);
+                                               checkpassword(scalar $form->field("name"), shift);
                                        },
                                );
                        }
@@ -305,7 +305,7 @@ sub formbuilder_setup (@) {
                                                noimageinline => 1));
                        }
                        else {
-                               $form->text("<a href=\"".
+                               $form->text("<a rel=\"nofollow\" href=\"".
                                        IkiWiki::cgiurl(do => "edit", page => $userpage).
                                        "\">".gettext("Create your user page")."</a>");
                        }
@@ -395,7 +395,7 @@ sub formbuilder (@) {
                if ($form->submitted eq "Save Preferences" && $form->validate) {
                        my $user_name=$form->field('name');
                        if (defined $form->field("password") && length $form->field("password")) {
-                               setpassword($user_name, $form->field('password'));
+                               setpassword($user_name, scalar $form->field('password'));
                        }
                }
        }