JBAS-1792 Remote auth logging handles barcodes
authorBill Erickson <berickxx@gmail.com>
Wed, 23 Aug 2017 15:22:51 +0000 (11:22 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Fix an issue in remoteauth.cgi logging where it failed to log barcodes
when they were passed via the generic "user" parameter.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/examples/remoteauth.cgi

index 0aea483..3ee752f 100755 (executable)
@@ -93,7 +93,7 @@ if (!($u || $usrname || $barcode) || !$p) {
         $user = $e->search_actor_user({usrname => $u})->[0];
     }
 
-    my $logtag = $barcode ? "barcode=$barcode" : "username=$usrname";
+    my $logtag = $nametype eq 'barcode' ? "barcode=$u" : "username=$u";
 
     if (!$user) {
         $logger->warn("remoteauth: no such user $logtag");