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

fix(gokrb5.config): do not panic on auth_to_local* #550

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

matchaxnb
Copy link

auth_to_local* directives are still not supported, but that's not a good reason to panic when we encounter them. Now we will just explicitly ignore them.

Also improve error reporting in general when we encounter incomplete parser situations. Now, if we are in an unhandled parser situation, we will return an explicit error instead of panicking on an IndexError.

Previous situation: passing an "auth_to_local" directive caused a Panic when doing v := strings.TrimSpace(p[1])
Now we are just explicitly saying we do not support that which is objectively better.

When we encounter an unsupported configuration directive and the parser reaches an incorrect state, we will report the error and output the config. There's a good chance that the latest configuration directive put is the unsupported one. This way, we can easily fix such mistakes when they come in issues.

Matcha added 3 commits September 20, 2024 13:56
Extended:
Also improve error reporting when we encounter incomplete parser
situations. Now, if we are in an unhandled parser situation, we will
return an explicit error instead of panicking on an IndexError.

Previous situation: passing an "auth_to_local" directive caused a Panic
when doing v := strings.TrimSpace(p[1])
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

Successfully merging this pull request may close these issues.

1 participant