diff options
| author | James Elliott <james-d-elliott@users.noreply.github.com> | 2022-10-28 20:21:43 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-28 20:21:43 +1100 |
| commit | a048ab6d47667f4b412792b39955c46adbcac48b (patch) | |
| tree | 27ab1b71cde3be95b62dcc7a5b488779f9563404 /internal/authentication/ldap_user_provider_test.go | |
| parent | 1864e9f2f8baeba1687048ebe16af1627577bb87 (diff) | |
fix(authentication): erroneously escaped group base dn (#4288)
The BaseDN for groups was escaped improperly and failed on any BaseDN with special characters. This fixes the issue.
Diffstat (limited to 'internal/authentication/ldap_user_provider_test.go')
| -rw-r--r-- | internal/authentication/ldap_user_provider_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/authentication/ldap_user_provider_test.go b/internal/authentication/ldap_user_provider_test.go index a74e24477..d28d05e9c 100644 --- a/internal/authentication/ldap_user_provider_test.go +++ b/internal/authentication/ldap_user_provider_test.go @@ -120,10 +120,10 @@ func TestEscapeSpecialCharsInGroupsFilter(t *testing.T) { Emails: []string{"john.doe@authelia.com"}, } - filter, _ := ldapClient.resolveGroupsFilter("john", &profile) + filter := ldapClient.resolveGroupsFilter("john", &profile) assert.Equal(t, "(|(member=cn=john \\28external\\29,dc=example,dc=com)(uid=john)(uid=john))", filter) - filter, _ = ldapClient.resolveGroupsFilter("john#=(abc,def)", &profile) + filter = ldapClient.resolveGroupsFilter("john#=(abc,def)", &profile) assert.Equal(t, "(|(member=cn=john \\28external\\29,dc=example,dc=com)(uid=john)(uid=john\\#\\=\\28abc\\,def\\29))", filter) } |
