summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-11-01 21:45:53 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-11-01 21:45:53 +0000
commit276e52fe93b5090c51aa18746d66bf1d39cd0920 (patch)
tree7833c07fcf627a01f4d1aeb7821468c89a810573
parent83ee58d1a333549b4dfc4177d095017e8f155a5c (diff)
Temporary fix for http auth and get_password
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1833 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-xLedgerSMB.pm23
1 files changed, 14 insertions, 9 deletions
diff --git a/LedgerSMB.pm b/LedgerSMB.pm
index d2eeb9bc..96006b62 100755
--- a/LedgerSMB.pm
+++ b/LedgerSMB.pm
@@ -211,6 +211,7 @@ sub new {
}
+#This function needs to be moved into the session handler.
sub _get_password {
my ($self) = shift @_;
$self->{sessionexpired} = shift @_;
@@ -222,15 +223,19 @@ sub _get_password {
$attr->{value} = $self->{$_};
push @{$self->{hidden}}, $attr;
}
- my $template = LedgerSMB::Template->new(
- user =>$self->{_user},
- locale => $self->{_locale},
- path => 'UI',
- template => 'get_password',
- format => 'HTML'
- );
- $template->render($self);
- $template->output('http');
+ print "WWW-Authenticate: Basic realm=\"LedgerSMB\"\n";
+ print "Status: 401 Unauthorized\n\n";
+ print "Please enter your credentials.\n";
+ exit;
+# my $template = LedgerSMB::Template->new(
+# user =>$self->{_user},
+# locale => $self->{_locale},
+# path => 'UI',
+# template => 'get_password',
+# format => 'HTML'
+# );
+# $template->render($self);
+# $template->output('http');
exit;
}