$form->field(name => "email", size => 50);
$form->title("register");
$form->text("");
+
+ $form->field(name => "confirm_password",
+ validate => sub {
+ shift eq $form->field("password");
+ },
+ );
+ $form->field(name => "password",
+ validate => sub {
+ shift eq $form->field("confirm_password");
+ },
+ );
}
if ($form->submitted) {
}
if ($submittype eq "Create Account") {
- $form->field(
- name => "confirm_password",
- validate => sub {
- shift eq $form->field("password");
- },
- );
$form->field(
name => "account_creation_password",
validate => sub {
value => $session->param("name"), force => 1,
fieldset => "login");
$form->field(name => "password", type => "password",
- fieldset => "login");
+ fieldset => "login",
+ validate => sub {
+ shift eq $form->field("confirm_password");
+ }),
$form->field(name => "confirm_password", type => "password",
fieldset => "login",
validate => sub {
shift eq $form->field("password");
- });
-
+ }),
}
}
if ($form->submitted eq "Save Preferences" && $form->validate) {
my $user_name=$form->field('name');
foreach my $field (qw(password)) {
- if (defined $form->field($field)) {
+ if (defined $form->field($field) && length $form->field($field)) {
IkiWiki::userinfo_set($user_name, $field, $form->field($field)) ||
error("failed to set $field");
}
there.
* Patch from hb to fix the pagestats plugin, which was broken by a past
change to the backlinks() function.
+ * Fix some bugs in password handling:
+ - If the password is empty in preferences, don't clear the existing
+ password.
+ - Actually check the confirm password field, even if it's left empty.
- -- Joey Hess <joeyh@debian.org> Sat, 12 May 2007 13:55:19 -0400
+ -- Joey Hess <joeyh@debian.org> Thu, 17 May 2007 04:02:04 -0400
ikiwiki (2.00) unstable; urgency=low
--- /dev/null
+I have just deleted my password, accidentally (which is not a crisis, but it shouldn't really happen).
+
+I logged in to tweak my page subscriptions, did so, and clicked 'save preferences' - unfortunately, the password boxes are cleared when you arrive at the preferences page and if you don't fill them in again then the new password (which is blank) gets saved. I'm sure I'm not the first one to notice this - I'm just writing here because I've not yet found anywhere where this inconvenience is documented.
+
+-- [[KarlMW]]
+
+[[fixed|done]] --[[Joey]]
-I have just deleted my password, accidentally (which is not a crisis, but it shouldn't really happen).
-
-I logged in to tweak my page subscriptions, did so, and clicked 'save preferences' - unfortunately, the password boxes are cleared when you arrive at the preferences page and if you don't fill them in again then the new password (which is blank) gets saved. I'm sure I'm not the first one to notice this - I'm just writing here because I've not yet found anywhere where this inconvenience is documented.
-
--- [[KarlMW]]
\ No newline at end of file
+moved to [[bugs/password_deletion]] --[[Joey]]