gofr icon indicating copy to clipboard operation
gofr copied to clipboard

Panic while using EnableBasicAuth when odd number of arguments are passed

Open coolwednesday opened this issue 1 year ago • 1 comments

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.

coolwednesday avatar Aug 08 '24 05:08 coolwednesday

@Umang01-hash please assign this issue to me.

coolwednesday avatar Aug 08 '24 05:08 coolwednesday