Revision b697e513
Added by Michael Moll almost 6 years ago
app/models/auth_sources/auth_source_ldap.rb | ||
---|---|---|
|
||
def validate_ldap_filter
|
||
Net::LDAP::Filter.construct(ldap_filter)
|
||
# rubocop:disable Lint/ShadowedException, Lint/UnneededCopDisableDirective
|
||
rescue Net::LDAP::Error, Net::LDAP::LdapError, Net::LDAP::FilterSyntaxInvalidError => e
|
||
# rubocop:enable Lint/ShadowedException, Lint/UnneededCopDisableDirective
|
||
message = _("invalid LDAP filter syntax")
|
||
Foreman::Logging.exception(message, e)
|
||
errors.add(:ldap_filter, message)
|
Also available in: Unified diff
Refs #22058 - refresh rubocop config and apply autofixes