Skip to content

Commit

Permalink
Restore default database handling in login
Browse files Browse the repository at this point in the history
  • Loading branch information
ylavoie committed Sep 1, 2020
1 parent 59482f5 commit 7e7730e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/LedgerSMB/Scripts/login.pm
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ my $json = JSON::MaybeXS->new( pretty => 1,
sub authenticate {
my ($request) = @_;

$request->{company} ||= $LedgerSMB::Sysconfig::default_db;

if ($request->{_req}->content_length > 4096) {
# Obviously, the request to log in can't be slurped into memory
# when bigger than 4k (which it ***NEVER*** should be...
Expand All @@ -80,6 +78,7 @@ sub authenticate {
|| ! $r->{password}) {
return LedgerSMB::PSGI::Util::unauthorized();
}
$r->{company} ||= $LedgerSMB::Sysconfig::default_db;
if ($request->{_create_session}->($r->{login},
$r->{password},
$r->{company})) {
Expand Down

0 comments on commit 7e7730e

Please sign in to comment.