jcmturner / gokrb5

Pure Go Kerberos library for clients and services
Apache License 2.0
723 stars 245 forks source link

Fix panic in case of one line realm configuration #448

Open obatysh opened 2 years ago

obatysh commented 2 years ago

We had a panic problem parsing a config with one line realm configuration, like: [realms] ATHENA.MIT.EDU = { kdc = kerberos.mit.edu }

panic: runtime error: slice bounds out of range [1:0] in config.parseRealms

The following change fixes the panic problem.

jcmturner commented 2 years ago

Thanks for the PR. Some observations I have...