From a6b023a816202a91c306fd897fbbb1abc06d72e7 Mon Sep 17 00:00:00 2001
From: dklawren
+ Warning: You will need to enter your current password above to + confirm this action. +
I acknowledge that my account will not be functional after it has been diff --git a/userprefs.cgi b/userprefs.cgi index e2127fe43..0462f5eed 100755 --- a/userprefs.cgi +++ b/userprefs.cgi @@ -198,6 +198,15 @@ sub MfaAccount { sub DisableAccount { my $user = Bugzilla->user; + my $cgi = Bugzilla->cgi; + + my $oldpassword = $cgi->param('old_password'); + my $oldcryptedpwd = $user->cryptpassword; + $oldcryptedpwd || ThrowCodeError("unable_to_retrieve_password"); + + if (bz_crypt($oldpassword, $oldcryptedpwd) ne $oldcryptedpwd) { + ThrowUserError("old_password_incorrect"); + } my $new_login = 'u' . $user->id . '@disabled.tld'; -- 2.47.3