Handle invalid strings in authorization headers

What does this MR do?

When using git-over-http the GitHttpClientController would try to look up the user or token read from the Authorization headers.

If one of those headers would contain a base64 encoded null-byte, this would result in an ArgumentError.

This adds support for that to the middleware by decoding the authorization headers and validating them beforehand.

It will also avoid trying to decode non-base64 encoded headers, and instead validate the content without as-is.

This reverts commit 44cebe45.

Part of !46985 (merged)

Reintroduces !46985 (merged)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Bob Van Landuyt

Merge request reports

Loading