Skip to content
Snippets Groups Projects
Verified Commit 0d0982f8 authored by Jan Pavlíček's avatar Jan Pavlíček
Browse files

fix: array_filter wrong order of parameters

parent 1adbf4b8
No related branches found
No related tags found
1 merge request!56feat: user without sfa with mfa must perform mfa, without either will be redirected to new page
Pipeline #283051 passed
......@@ -12,9 +12,9 @@ class ContextSettings
$password_contexts = $config->getArray('password_contexts', AuthSwitcher::PASSWORD_CONTEXTS);
$mfa_contexts = $config->getArray('mfa_contexts', AuthSwitcher::MFA_CONTEXTS);
if ($contexts_regex) {
$password_contexts_patterns = array_filter(self::isRegex, $password_contexts);
$password_contexts_patterns = array_filter($password_contexts, self::isRegex);
$password_contexts = array_diff($password_contexts, $password_contexts_patterns);
$mfa_contexts_patterns = array_filter(self::isRegex, $mfa_contexts);
$mfa_contexts_patterns = array_filter($mfa_contexts, self::isRegex);
$mfa_contexts = array_diff($mfa_contexts, $mfa_contexts_patterns);
} else {
$password_contexts_patterns = [];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment