Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update config.example.yml #12

Closed
godfat opened this issue Sep 24, 2009 · 5 comments
Closed

update config.example.yml #12

godfat opened this issue Sep 24, 2009 · 5 comments

Comments

@godfat
Copy link
Contributor

godfat commented Sep 24, 2009

see:
http://github.com/godfat/rubycas-server/commit/addb581e6c8c9161dc55df452c551e1fdfd9241d

Since $CONF.authenticator is always read as an array:
http://github.com/gunark/rubycas-server/blob/01238483a9691dcf0deb0468ca8b41a7603e7071/lib/casserver/controllers.rb#L136

@zuk
Copy link
Member

zuk commented Sep 24, 2009

Take a look at line 38 in http://github.com/gunark/rubycas-server/blob/master/lib/casserver/conf.rb

We check whether the authenticator config is an array and convert if required.

Requiring users to add a tiny dash in front of their authenticator settings in their config.yml might be a bit too esoteric. Unless your intimately familiar with YAML, it's not at all obvious that - means "array". The goal is to make the initial set up process for new users as easy as possible, so in the interest of simplicity I'd rather allow users to enter a non-array value for their authenticator.

@godfat
Copy link
Contributor Author

godfat commented Sep 24, 2009

I thought it was an intentional change, so I was changing the config.
I know your concern and I totally agree with it.
But this line:
http://github.com/gunark/rubycas-server/blob/master/lib/casserver/conf.rb#L38
didn't really fix the problem, it didn't touch $CONF[:authenticator].
And this line:
http://github.com/gunark/rubycas-server/blob/01238483a9691dcf0deb0468ca8b41a7603e7071/lib/casserver/controllers.rb#L136
i.e. $CONF.authenticator[auth_index]
Thinks $CONF.authenticator is an array, not $AUTH.
I've reverted the config change, and applied another patch
to ensure $CONF.authenticator is always an array.
http://github.com/godfat/rubycas-server/commit/ab71dff90792aeeb9025e706c7e58dba1140e3d8
i.e. $CONF[:authenticator] = [$CONF[:authenticator]]
I don't think this is a good idea, but just a quick and dirty fix.

Thanks for your reply.

@zuk
Copy link
Member

zuk commented Sep 29, 2009

Github is refusing to let me apply patches right now... something about the repository being migrated to a new server.

I'll get this stuff applied ASAP.

Thanks for all the hard work.

@Jimflip
Copy link
Contributor

Jimflip commented Jan 24, 2010

has this been updated as I wasted plenty of time finding out the config requires an extra - in order for my server not to crash with 'premature end of script' errors.

thanks.

@zuk
Copy link
Member

zuk commented Jan 24, 2010

Ah crap I must have closed this without actually pulling in the fix. Should be there now. Thanks for the reminder.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants