first validation request now resets the box
change action "box_purge" to "do_purge"
This commit is contained in:
parent
d4dbcba4f3
commit
e2cef6c3dc
|
@ -481,7 +481,6 @@ case "$ACTION" in
|
|||
$0 crypto-down
|
||||
$0 config-down
|
||||
box_purge
|
||||
$0 diskinfo
|
||||
;;
|
||||
poweroff )
|
||||
is_crypto_mounted && umount_crypto
|
||||
|
|
|
@ -615,20 +615,18 @@ if ( ! &check_ssl()) {
|
|||
$pagedata->setValue('Data.Redirect.Delay', "60");
|
||||
}
|
||||
################### box_purge #######################
|
||||
# TODO test this code
|
||||
# if we find an existing config partition, then read the adminpw
|
||||
# and ask the user (validationscript or webfrontend) for it
|
||||
} elsif ($action eq 'box_purge') {
|
||||
# if we find an existing config partition, then check the adminpw
|
||||
} elsif ($action eq 'do_purge') {
|
||||
if ( &check_config()) {
|
||||
# TODO old config found, read the admin passwd
|
||||
my $current_admin_pw = &get_admin_pw;
|
||||
if ($current_admin_pw ne $query->param('current_admin_password')) {
|
||||
if ($current_admin_pw ne '' && $current_admin_pw ne $query->param('current_admin_password')) {
|
||||
$pagedata->setValue('Data.Warning', 'WrongAdminPassword');
|
||||
$pagedata->setValue('Data.Action', 'form_config');
|
||||
} else {
|
||||
&box_purge;
|
||||
&box_purge;
|
||||
$pagedata->setValue('Data.Action', 'form_init');
|
||||
}
|
||||
}
|
||||
}
|
||||
################### unknown #########################
|
||||
} else {
|
||||
$pagedata->setValue('Data.Error', 'UnknownAction');
|
||||
|
|
|
@ -1 +1 @@
|
|||
show the main page
|
||||
purge the box
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
url https://_HOST_IP_DEFAULT_/cryptobox
|
||||
data weblang=_IFACE_LANG_
|
||||
data action=do_purge
|
||||
data current_admin_password=
|
||||
|
|
Loading…
Reference in New Issue