rubycas / rubycas-server

Provides single sign-on authentication for web applications, implementing the server-end of Jasig's CAS protocol.
http://rubycas.github.com
Other
628 stars 270 forks source link

Using Multiple authenticators fails when one or more of them are not loaded #233

Closed viranch closed 9 years ago

viranch commented 9 years ago

I'm using multiple authenticators, LDAP and SQLMd5 (in that order). The latter is not loaded into the path, so init_authenticators! loads the first one, and next raises NameError causing the rescue block to again load all authenticators, and add it to the auth array.

Now auth array has 3 elements (LDAP appended twice and then SQLMd5). This causes auth.zip(config[:authenticators]) to fail.

This looks like a trivial fix, just put rescue block inside the loop.