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 crypto-down
|
||||||
$0 config-down
|
$0 config-down
|
||||||
box_purge
|
box_purge
|
||||||
$0 diskinfo
|
|
||||||
;;
|
;;
|
||||||
poweroff )
|
poweroff )
|
||||||
is_crypto_mounted && umount_crypto
|
is_crypto_mounted && umount_crypto
|
||||||
|
|
|
@ -615,18 +615,16 @@ if ( ! &check_ssl()) {
|
||||||
$pagedata->setValue('Data.Redirect.Delay', "60");
|
$pagedata->setValue('Data.Redirect.Delay', "60");
|
||||||
}
|
}
|
||||||
################### box_purge #######################
|
################### box_purge #######################
|
||||||
# TODO test this code
|
# if we find an existing config partition, then check the adminpw
|
||||||
# if we find an existing config partition, then read the adminpw
|
} elsif ($action eq 'do_purge') {
|
||||||
# and ask the user (validationscript or webfrontend) for it
|
|
||||||
} elsif ($action eq 'box_purge') {
|
|
||||||
if ( &check_config()) {
|
if ( &check_config()) {
|
||||||
# TODO old config found, read the admin passwd
|
|
||||||
my $current_admin_pw = &get_admin_pw;
|
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.Warning', 'WrongAdminPassword');
|
||||||
$pagedata->setValue('Data.Action', 'form_config');
|
$pagedata->setValue('Data.Action', 'form_config');
|
||||||
} else {
|
} else {
|
||||||
&box_purge;
|
&box_purge;
|
||||||
|
$pagedata->setValue('Data.Action', 'form_init');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
################### unknown #########################
|
################### unknown #########################
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
show the main page
|
purge the box
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
url https://_HOST_IP_DEFAULT_/cryptobox
|
url https://_HOST_IP_DEFAULT_/cryptobox
|
||||||
data weblang=_IFACE_LANG_
|
data weblang=_IFACE_LANG_
|
||||||
|
data action=do_purge
|
||||||
|
data current_admin_password=
|
||||||
|
|
Loading…
Reference in a new issue