Added auth filter check regex

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2022-06-30 15:15:49 -07:00
parent 2cace3c73a
commit 7591f3f092

View file

@ -917,11 +917,13 @@ class SettingsController extends Controller
$messages = [
'ldap_username_field.not_in' => '<code>sAMAccountName</code> (mixed case) will likely not work. You should use <code>samaccountName</code> (lowercase) instead. ',
'ldap_auth_filter_query.not_in' => '<code>uid=samaccountname</code> is probably not a valud auth filter. You probably want <code>uid=</code> ',
'ldap_filter.regex' => 'This value should probably not be wrapped in parentheses.',
];
$validator = Validator::make($setting->toArray(), [
'ldap_username_field' => 'not_in:sAMAccountName',
'ldap_auth_filter_query' => 'not_in:uid=samaccountname',
'ldap_filter' => 'regex:"^[^(]"',
], $messages);