From 42968db7ff3c67bde429170467e83abdba0b65d4 Mon Sep 17 00:00:00 2001 From: duergner Date: Tue, 26 Aug 2003 20:03:25 +0000 Subject: [PATCH] support for empty password strings added --- lam/lib/pdf.inc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lam/lib/pdf.inc b/lam/lib/pdf.inc index 0b07355e..85a69224 100644 --- a/lam/lib/pdf.inc +++ b/lam/lib/pdf.inc @@ -103,6 +103,10 @@ function createUserPDF($accounts) { $pdfFile->setFont("times","B",10); $pdfFile->Cell(50,5,_("Unix password disabled!"),0,1,"L",0); } + elseif($account->unix_password == "") { + $pdfFile->setFont("times","B",10); + $pdfFile->Cell(50,5,_("[Empty password string]"),0,1,"L",0); + } else { $account->unix_password = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, base64_decode($account->unix_password), MCRYPT_MODE_ECB, $iv); $account->unix_password = str_replace(chr(00), '', $account->unix_password); @@ -132,6 +136,10 @@ function createUserPDF($accounts) { $pdfFile->setFont("times","B",10); $pdfFile->Cell(50,5,_("Samba password set to unix password."),0,1,"L",0); } + elseif($account->smb_password == "") { + $pdfFile->setFont("times","B",10); + $pdfFile->Cell(50,5,_("[Empty password string]"),0,1,"L",0); + } else { $account->smb_password = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, base64_decode($account->smb_password), MCRYPT_MODE_ECB, $iv); $account->smb_password = str_replace(chr(00), '', $account->smb_password);