-
Notifications
You must be signed in to change notification settings - Fork 268
Open
Labels
Description
I have configured rubycas-server to use the Authlogic authenticator. I found that in config.yml
, if I don't specify any encryptor_options
in the authenticator
section, then CASServer::Authenticators::SQLAuthlogic#validate
errors out with the following:
NoMethodError - undefined method `each' for nil:NilClass:
/home/bitaxis/.rvm/gems/ruby-1.9.2-p290/gems/rubycas-server-1.0.1/lib/casserver/authenticators/sql_authlogic.rb:69:in `validate'
/home/bitaxis/.rvm/gems/ruby-1.9.2-p290/gems/rubycas-server-1.0.1/lib/casserver/server.rb:444:in `block (2 levels) in <class:Server>'
/home/bitaxis/.rvm/gems/ruby-1.9.2-p290/gems/rubycas-server-1.0.1/lib/casserver/server.rb:436:in `each'
/home/bitaxis/.rvm/gems/ruby-1.9.2-p290/gems/rubycas-server-1.0.1/lib/casserver/server.rb:436:in `block in <class:Server>'
The reason is simple, as @options[:encryptor_options]
evaluates to nil
when no encryptor_options
are specified.
One fix is modifying line 69 to be as follows:
(@options[:encryptor_options] || []).each do |name, value|
I've tested this fix locally, and it works fine.