diff --git a/lam/lib/pdf.inc b/lam/lib/pdf.inc index b7c794e6..9c10c4b3 100644 --- a/lam/lib/pdf.inc +++ b/lam/lib/pdf.inc @@ -38,6 +38,10 @@ function createUserPDF($accounts) { $pdfFile->setCreator("LDAP Account Manager (pdf.inc)"); for($i=0;$iunix_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); $pdfFile->addPage(); // Print General settings $pdfFile->setFont("arial","B",12); @@ -73,10 +77,12 @@ function createUserPDF($accounts) { $text = ""; $shells = $account->general_shell; for($j=0;$jsetFont("times","B",10); $pdfFile->Cell(50,5,$text,0,1,"L",0); @@ -113,6 +119,8 @@ function createUserPDF($accounts) { } $pdfFile->Cell(50,5,$text,0,1,"L",0); if($account->smb_useunixpwd == 0) { + $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); $pdfFile->setFont("times","",10); $pdfFile->Cell(50,5,_("Samba password") . ":",0,0,"R",0); $pdfFile->setFont("times","B",10);