Score:0

Apache2 LDAP Authentication - invalid Username leads to Error 500

in flag
tux

I have a directory on my apache2 that only a certain group of my active directory should be able to access. This is in my apache2.conf:

<Directory /var/www/html/mydirectory/>
        AllowOverride All
        AuthType Basic
        AuthName "Apache LDAP authentication"
        AuthBasicAuthoritative Off
        AuthBasicProvider ldap
        AuthLDAPURL "ldap://192.168.0.5:389/CN=Users,DC=my-domain,DC=com?sAMAccountName?sub?(objectClass=*)"
        AuthLDAPBindDN "[email protected]“
        AuthLDAPBindPassword "mypassword"
        Require ldap-group CN=somegroup,CN=Users,dc=my-domain,dc=com
</Directory>

This just works fine, but if you enter non existing usernames you get Error 500.

How can I prevent this? Expected behavior: just telling the user that the credentials are invalid.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.