fix: allow Basic auth realm values without quotes#25
fix: allow Basic auth realm values without quotes#25nichtsfrei wants to merge 1 commit intoclowdhaus:mainfrom
Conversation
Some clients send the `WWW-Authenticate` header in the form: `< Www-Authenticate: Basic realm=Reducated` instead of the standard: `< Www-Authenticate: Basic realm="Reducated"` To ensure compatibility, loosen the parsing regex to accept realm values that are not wrapped in quotes when processing the authentication header.
|
I don't know about this change - this very clearly states that its a quoted string https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/WWW-Authenticate#realm
as well as here https://datatracker.ietf.org/doc/html/rfc2617
|
|
You're absolutely right. Unfortunately, one of our customers is hosting a Docker registry that violates this specific rule, and I thought it might be a small enough change that it would be okay to loosen it up. |
Some clients send the
WWW-Authenticateheader in the form:< Www-Authenticate: Basic realm=Reducatedinstead of the standard:
< Www-Authenticate: Basic realm="Reducated"To ensure compatibility, loosen the parsing regex to accept realm values that are not wrapped in quotes when processing the authentication header.