From 276e52fe93b5090c51aa18746d66bf1d39cd0920 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Thu, 1 Nov 2007 21:45:53 +0000 Subject: 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 --- LedgerSMB.pm | 23 ++++++++++++++--------- 1 file 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; } -- cgit v1.2.3