action => $action,
);
+ delete @{ $::form }{ grep { m/^\{AUTH\}/ } keys %{ $::form } };
+
if ($action) {
$::instance_conf->init if $auth_level eq 'user';
sub handle {
%::myconfig = ();
- return if $::auth->authenticate_root($::auth->get_session_value('rpw')) == $::auth->OK();
+ return if $::auth->authenticate_root($::auth->get_session_value('admin_password')) == $::auth->OK();
- $::auth->delete_session_value('rpw');
+ $::auth->delete_session_value('admin_password');
SL::Dispatcher::show_error('login/password_error', 'password', is_admin => 1);
}
$form->{favicon} = "favicon.ico";
if ($form->{action}) {
- if ($auth->authenticate_root($form->{rpw}) != $auth->OK()) {
+ if ($auth->authenticate_root($form->{'{AUTH}admin_password'}) != $auth->OK()) {
$form->{error_message} = $locale->text('Incorrect Password!');
- $auth->delete_session_value('rpw');
+ $auth->delete_session_value('admin_password');
adminlogin();
} else {
if ($auth->session_tables_present()) {
- delete $::form->{rpw};
+ delete $::form->{'{AUTH}admin_password'};
_apply_dbupgrade_scripts();
}
my $locale = $main::locale;
$main::auth->create_tables();
- $main::auth->set_session_value('rpw', $form->{rpw});
+ $main::auth->set_session_value('admin_password', $form->{'{AUTH}admin_password'});
$main::auth->create_or_refresh_session();
my $memberfile = $::lx_office_conf{paths}->{memberfile};
$action = 'login';
}
if ($action) {
- %::myconfig = $auth->read_user(login => $form->{login}) if ($form->{login});
+ $form->{login} = $form->{'{AUTH}login'} || $form->{login};
+ %::myconfig = $auth->read_user(login => $form->{login}) if $form->{login};
+
$::locale = Locale->new($::myconfig{countrycode}) if $::myconfig{countrycode};
- if (SL::Auth::OK != $auth->authenticate($::myconfig{login}, $form->{password})) {
+ if (SL::Auth::OK != $auth->authenticate($::myconfig{login}, $form->{'{AUTH}password'})) {
$form->{error_message} = $::locale->text('Incorrect username or password!');
login_screen();
} else {
$auth->create_or_refresh_session();
- delete $form->{password};
+ delete $form->{'{AUTH}password'};
$form->{titlebar} .= " - $::myconfig{name} - $::myconfig{dbname}";
call_sub($::locale->findsub($action));
-F 'settings.sellprice_adjustment_type=percent' \
-F 'settings.sellprice_places=2' \
-F 'settings.shoparticle_if_missing=0' \
- -F "login=${login}" \
- -F "password=${password}" \
+ -F "{AUTH}login=${login}" \
+ -F "{AUTH}password=${password}" \
-F "file=@${file}" \
${url}
}
<table>
<tr>
<th>[% 'Password' | $T8 %]</th>
- <td><input type="password" name="rpw" id="rpw"></td>
+ <td><input type="password" name="{AUTH}admin_password" id="rpw"></td>
<td><input type="submit" class="submit" name="action" value="[% 'Login' | $T8 %]"></td>
</tr>
<input type="hidden" name="action" value="login">
<table border="0">
<tr>
<th align="right">[% 'Login Name' | $T8 %]</th>
- <td><input class="login" name="login"></td>
+ <td><input class="login" name="{AUTH}login"></td>
<td> </td>
</tr>
<tr>
<th align="right">[% 'Password' | $T8 %]</th>
- <td><input class="login" type="password" name="password"></td>
+ <td><input class="login" type="password" name="{AUTH}password"></td>
<td><input type="submit" name="action" value="[% 'Login' | $T8 %]"></td>
</tr>
</table>
<table>
<tr>
<th align="right">[% 'Login Name' | $T8 %]</th>
- <td><input class="login" name="login" size="30" tabindex="1"></td>
+ <td><input class="login" name="{AUTH}login" size="30" tabindex="1"></td>
</tr>
<tr>
<th align="right">[% 'Password' | $T8 %]</th>
- <td><input class="login" type="password" name="password" size="30" tabindex="2"></td>
+ <td><input class="login" type="password" name="{AUTH}password" size="30" tabindex="2"></td>
</tr>
</table>