gofr
gofr copied to clipboard
Panic while using EnableBasicAuth when odd number of arguments are passed
Describe the bug Index goes out of range when we pass odd number of arguments while using EnableBasicAuth.
To Reproduce
- Create a http server.
- Use EnableBasicAuth and pass odd number of arguments.
- Create a mock request and add encoded authorisation header.
- Hit the request and we can notice the runtime error.
Expected behavior We can just add a simple return statement in the method EnableBasicAuth in gofr.go file.
@Umang01-hash please assign this issue to me.