[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[5898] trunk/LedgerSMB



Revision: 5898
          http://sourceforge.net/p/ledger-smb/code/5898
Author:   tshvr
Date:     2013-07-03 16:09:07 +0000 (Wed, 03 Jul 2013)
Log Message:
-----------
http_error from Auth?

Modified Paths:
--------------
    trunk/LedgerSMB/Auth/DB.pm
    trunk/LedgerSMB/Auth.pm
    trunk/LedgerSMB/Session.pm

Modified: trunk/LedgerSMB/Auth/DB.pm
===================================================================
--- trunk/LedgerSMB/Auth/DB.pm	2013-07-03 16:04:43 UTC (rev 5897)
+++ trunk/LedgerSMB/Auth/DB.pm	2013-07-03 16:09:07 UTC (rev 5898)
@@ -63,7 +63,7 @@
 
 sub credential_prompt{
     my ($suffix) = @_;
-    http_error(401, $suffix);
+    LedgerSMB::Auth->http_error(401, $suffix);#tshvr4
 }
 
 sub password_check { # Old routine, leaving in at the moment

Modified: trunk/LedgerSMB/Auth.pm
===================================================================
--- trunk/LedgerSMB/Auth.pm	2013-07-03 16:04:43 UTC (rev 5897)
+++ trunk/LedgerSMB/Auth.pm	2013-07-03 16:09:07 UTC (rev 5898)
@@ -73,9 +73,11 @@
 require "LedgerSMB/Auth/" . ${LedgerSMB::Sysconfig::auth} . ".pm";
 
 sub http_error {
-    my ($errcode, $msg_plus) = @_;
+    #my ($errcode, $msg_plus) = @_;
+    my ($unknown,$errcode, $msg_plus) = @_;#tshvr4 called as LedgerSMB::Auth->http_error('401');
     $msg_plus = '' if not defined $msg_plus;
     my $cgi = CGI::Simple->new();
+    print STDERR localtime()." tshvr4 Auth.pm http_error \$errcode=$errcode\n";
 
     my $err = {
 	'500' => {status  => '500 Internal Server Error', 

Modified: trunk/LedgerSMB/Session.pm
===================================================================
--- trunk/LedgerSMB/Session.pm	2013-07-03 16:04:43 UTC (rev 5897)
+++ trunk/LedgerSMB/Session.pm	2013-07-03 16:09:07 UTC (rev 5898)
@@ -166,7 +166,8 @@
     my ( $userID ) = $fetchUserID->fetchrow_array;
     unless($userID) {
         $logger->error(__FILE__ . ':' . __LINE__ . ": no such user: $login");
-        http_error('401');
+        LedgerSMB::Auth->http_error('401');#tshvr4
+        return;#tshvr4?
     }
 
 # this is assuming that the login is safe, which might be a bad assumption
@@ -199,7 +200,7 @@
 
     #create a new session
     $createNew->execute( $newSessionID, $newToken )
-      || http_error('401');
+      || LedgerSMB::Auth->http_error('401');#tshvr4
     $lsmb->{session_id} = $newSessionID;
 
     #reseed the random number generator

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.