diff --git a/lam/templates/login.php b/lam/templates/login.php index 842c16fa8..211c06b43 100644 --- a/lam/templates/login.php +++ b/lam/templates/login.php @@ -1,5 +1,6 @@ getDefaultDns(); - $dn = null; + return ''; } else { $dnList = $this->getSubDns($dn); diff --git a/lam/templates/upload/massBuildAccounts.php b/lam/templates/upload/massBuildAccounts.php index 06efc8668..1a0cffd3e 100644 --- a/lam/templates/upload/massBuildAccounts.php +++ b/lam/templates/upload/massBuildAccounts.php @@ -74,6 +74,9 @@ if (isset($_POST['showldif'])) { header('Content-Type: text/plain'); header('Content-disposition: attachment; filename=lam.ldif'); $accounts = unserialize(lamDecrypt($_SESSION['mass_accounts'])); + if ($accounts === false) { + exit; + } foreach ($accounts as $account) { echo "DN: " . $account['dn'] . "\n"; unset($account['dn']); diff --git a/phpstan.neon b/phpstan.neon index 930bad0d3..0f0174d9e 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,5 +1,5 @@ parameters: - level: 8 + level: 9 scanDirectories: - lam/lib - lam/templates @@ -38,3 +38,13 @@ parameters: - '#Parameter \#1 \$ldap of function ldap_get_entries expects LDAP\\Connection, resource given.#' - '#Parameter \#1 \$string of function htmlspecialchars expects string, array\|string given.#' - '#Parameter \#1 \$name of function LAM\\ACCOUNTLIST\\search_username expects string, array\|string given.#' + - '#Cannot access offset int\|string on mixed.#' + - '#Parameter \#1 \$array of function array_keys expects array, mixed given.#' + - '#Cannot access offset .+ on mixed.#' + - '#Argument of an invalid type mixed supplied for foreach, only iterables are supported.#' + - '#Parameter \#1 \$string of function htmlspecialchars expects string, mixed given.#' + - '#Parameter \#2 \$args of function call_user_func_array expects array, mixed given.#' + - '#Parameter \#2 \$user of function LAM\\ACCOUNTLIST\\setSpecifiedPassword expects array, array\|null given.#' + - '#Parameter \#2 \$user of function LAM\\ACCOUNTLIST\\generatePassword expects array, array\|null given.#' + - '#Parameter \#2 \$attributes of function LAM\\ACCOUNTLIST\\unlock expects array, array\|null given.#' + - '#Parameter \#2 \$attributes of function LAM\\ACCOUNTLIST\\lock expects array, array\|null given.#'