From: Moritz Bunkus Date: Thu, 10 Aug 2006 13:25:47 +0000 (+0000) Subject: Sicherheitsfix fuer die Umgehung der Anmeldung am Admin-Frotend unter Angabe von... X-Git-Tag: release-2.4.0^2~249 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=bbc9fa5eef6ad9cfadb370029cab8429fb82de88;p=kivitendo-erp.git Sicherheitsfix fuer die Umgehung der Anmeldung am Admin-Frotend unter Angabe von "action=" ohne Passwort. --- diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl index 64dc24950..2632aff07 100644 --- a/bin/mozilla/admin.pl +++ b/bin/mozilla/admin.pl @@ -38,6 +38,7 @@ use SL::Form; use SL::User; $form = new Form; +$form->{"root"} = "root login"; $locale = new Locale $language, "admin"; @@ -55,6 +56,7 @@ $form->{favicon} = "favicon.ico"; if ($form->{action}) { + $subroutine = $locale->findsub($form->{action}); if ($subroutine eq 'login') { @@ -123,7 +125,6 @@ sub adminlogin { . $locale->text('Login') . qq|"> - {path}> @@ -192,8 +193,7 @@ sub form_footer { print qq| - - + {path}> {rpw}> @@ -289,7 +289,7 @@ sub list_users { foreach $key (sort keys %member) { $href = - "$script?action=edit&login=$key&path=$form->{path}&root=$form->{root}&rpw=$form->{rpw}"; + "$script?action=edit&login=$key&path=$form->{path}&rpw=$form->{rpw}"; $href =~ s/ /%20/g; $member{$key}{templates} =~ s/^$templates\///; @@ -328,7 +328,6 @@ sub list_users { {path}> {rpw}> -
@@ -1120,7 +1119,6 @@ sub change_admin_password { . $locale->text('Password') . qq| - {path}> {rpw}> @@ -1144,20 +1142,17 @@ sub change_password { $root->save_member($memberfile); $form->{callback} = - "$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$root->{password}"; + "$form->{script}?action=list_users&path=$form->{path}&rpw=$root->{password}"; $form->redirect($locale->text('Password changed!')); } sub check_password { - $root = new User "$memberfile", $form->{root}; - if ($root->{password}) { - if ($root->{password} ne $form->{rpw}) { - $form->error($locale->text('Incorrect Password!')); - } + if (!$root->{password} || ($root->{password} ne $form->{rpw})) { + $form->error($locale->text('Incorrect Password!')); } } @@ -1268,8 +1263,7 @@ sub dbselect_source { - - + {path}> {rpw}> @@ -1364,9 +1358,8 @@ $upd - + - {path}> {rpw}> @@ -1497,9 +1490,8 @@ sub create_dataset { {dbpasswd}> {dbdefault}> - + - {path}> {rpw}> @@ -1551,7 +1543,6 @@ sub dbcreate { . qq| - @@ -1615,9 +1606,8 @@ sub delete_dataset { {dbpasswd}> {dbdefault}> - + - @@ -1668,7 +1658,6 @@ $form->{db} | . $locale->text('successfully deleted!') . qq| - @@ -1690,7 +1679,7 @@ sub unlock_system { unlink "$userspath/nologin"; $form->{callback} = - "$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$root->{password}"; + "$form->{script}?action=list_users&path=$form->{path}&rpw=$root->{password}"; $form->redirect($locale->text('Lockfile removed!')); @@ -1703,7 +1692,7 @@ sub lock_system { close(FH); $form->{callback} = - "$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$root->{password}"; + "$form->{script}?action=list_users&path=$form->{path}&rpw=$root->{password}"; $form->redirect($locale->text('Lockfile created!'));